Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Table Join Question

Re: Table Join Question

From: Joe Celko <71062.1056_at_compuserve.com>
Date: Tue, 22 Aug 2000 23:13:08 GMT
Message-ID: <8nv1dl$mga$1@nnrp1.deja.com>

>> But I have inherited a huge 60+ table legacy schema, where I could
do the joins either way. If it were the case, does your post imply I should always join back to the table which has the primary key? <<

Can you clean up the schema? It will never work right if you cannot normalize to at least 3NF. The general ansswer is to use the PRIMARY KEY because it is what uniquely identifies the entity. Anything else is a secondary reference. And it will run faster becaue of indexes, as Heinz already said.

--CELKO--
Joe Celko, SQL and Database Consultant
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc) which can be cut and pasted into Query Analyzer is appreciated.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Aug 22 2000 - 18:13:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US