Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Design Question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01088759
Message ID:
01088775
Views:
7
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform