Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non data bearing primary keys
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00106667
Message ID:
00106690
Vues:
27
>I recently got into a discussion with a co-worker about using non-data bearing Primary Keys...
> ALL tables should have a non-data bearing PK....

Agreed....

>3) It makes ER diagrams and databases easier to read. If you use a simple
>naming convention you know any field with a FK (my convention) a the end is the
>one and only foreign key into the table for another table.

Not necessarily: if you have, say, three possible insurance carriers, you'd want to store those three foreign keys, rather than take up the overhead with counting how many times you've added into the cross-reference table...

>2) Joins may be more complex. I think this only applies to simple lookup
>tables though. Any tables with multi-field PK's, a non-data bearing key makes
>them easier.

Why? Having a single link would almost certainly make them easier. Besides, if you use an integer key, it's faster in many cases than the natural key...
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform