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:
00107026
Vues:
27
>I recently got into a discussion with a co-worker about using non-data bearing Primary Keys (unique ID's or identities in SQL/Access terms). My feeling is this:

One thing I didn't see in the previous answers was the convenience of surrogate keys based on a standard naming scheme. We've found that a year into a large project that updating code with standardized field names (ID and non_ID) is MUCH easier than for the 'legacy' tables.

We add a 2-char prefix to each field which is unique to the table. If the primary key in one table is ODID then the foreign key in a child table will be PR_ODID. Even SQL code is simplified when we know that a field name is unique to a table.

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform