Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key question
Message
De
22/12/1999 22:46:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00307005
Message ID:
00307751
Vues:
25
Hi John,

>There is a big difference between a Key - such as an account number - and a Primary Key - best created through a generator - that is used to enforce referential integrity...

You can use an account number as your PK, then its just called a natural PK instead of a surrogate. But if this is an editable field, it makes changing it that more difficult, and its better to seperate a user key (canidate, something the user will identify with and mantian) and the system key (primary, used for relationships, auto generated).

I've only used a natural key once. I had 3 fields in a table, a PK, FK, and an ItemCOde field, 1 PI and 2 CIs, respectivly. I thought it would be easier to make the ItemCode the PK and leave only 2 fields.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform