Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non data bearing primary keys
Message
De
19/06/1998 19:27:44
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00106667
Message ID:
00110118
Vues:
43
>Equipment Table - Handle+Ref_num current PK, Account+Ref_num current FK
>Account Table - Account+Ref_num current PK
>Phonenums Table - Phone Number current PK, Handle+Ref_num and Account+Ref_num current FKs.

I'd really appreciate it if I knew what's ref_num in your case, when is a new one generated and what does it cover for. Thinking of all the raw data coming in from everywhere, you may just be better off with the keys you already have.

>So how to do I manage to add a non data PK to my tables when the text files are appended in, that allow will me to maintain my relationships between these tables? Example... I need to matchup the same account in Accounts Table to Phonenums or Handles, and if each of those tables have an independent PK - how in the world will I continue to make my Joins work??? Note - when the raw data comes in via my text files, the data is in no natural order that would make this easy.

Well, you'd have to propagate other table's PKs into your tables' FKs just as you did before; you may just omit the existing FK and keep only the new FK, in case you decide to go integer PKs. In that case, your present PKs could remain as candidate keys or maybe get dropped out. Now each table would have a meaningless PK of integer type, and the foreign keys would be also integers copied from PKs of their respective records in foreign tables. You'd probably gain some speed because the keys are now four-byte integers, instead of whatever the length strings.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform