Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Design Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01088759
Message ID:
01088775
Vues:
8
For this type of situation, where a foreign key may point to different tables I use a structure like;
Field Name         Description
TablePK            The PK for this table
OwnerTypeFK        A foreign key to a lookup table of all possible OwnerTypes
                   (ie Employee, Vehicle, or Place)
OwnerFK            The FK value for the specified OwnerType
You also use additional fields in the OwnerType lookup table to store the rules like a what OwnerTypes are legal for each OwnerType.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform