Link Primary Key to two fields in second table
An order has multiple people involved. You have a one-to-many relationship.
The following tables are suggested:
TblPeople
PeopleID
other people fields
TblOrderPeopleType
OrderPeopleTypeID
OrderPeopleType
where OrderPeopleType a
Person Placing the Order
Technical Contact
Budget Officer
etc
TblOrder
OrderID
other order fields
TblOrderPeople
OrderPeopleID
OrderID
OrderPeopleTypeID
PeopleID
TblOrderPeople identifies the Person Placing the Order, Technical Contact,
Budget Officer, etc involved in an order. The relationships a
OrderID in TblOrder === OrderID in TblOrderPeople
OrderPeopleTypeID in TblOrderPeopleType === OrderID in TblOrderPeople
PeopleID in TblPeople === PeopleID in TblOrderPeople
Steve
"DewSweeper" wrote in message
...
I have a "People" table that I would link to an "Orders" table. The People
table has a record for each individual. A record in the orders table will
have multiple "People" in it (e.g., Person Placing the Order, Technical
Contact, Budget Officer, etc.). I would like to link the Primary Key of
the
"People" table (personID) to multiple fields in the orders table and
enforce
referential integrity. Access and SQL Server both disallow this. Is
there a
way around this? Any thoughts are appreciated.
|