Menu

#52 generating multiple foreign key with shared fields

open
nobody
None
5
2007-03-08
2007-03-08
Anonymous
No

I would like to define multiple foreign key by using some shared fields.

Example:
-------------
TABLE EMPLOIES
-------------
City (PK)
Name (PK)
Firm (PK)
...

-------------
TABLE PERSONS
-------------
City (PK)
Name (PK)
CildrenName

-------------
TABLE FIRMS
-------------
Firm (PK)
City (PK)
PersonsNo

(PK) stands for PrimaryKey.

I would like to make two foreign keys:
FK1: From table EMPLOIES to Table PERSONS on City and Name

FK1: From table EMPLOIES to Table FIRMS on City and Firms

Discussion


Log in to post a comment.

MongoDB Logo MongoDB