Hello,
I'm trying to figure out the best way to set up tables to handle a one-or-the-other relationship. I have a table of Inventory items. I have a table of Purchase Orders and a table of Leases. So each Inventory item is related to EITHER a PO or Lease, under a 1-to-many relationship from the PO or Lease to Inventory (one PO could be related to many items). Each PO or Lease has a contract associated with it that I'd like to be able to link to Inventory items via query.
So, I'm trying to find best way to set up relationship of these 3 tables in best way which hopefully forces/guides a one-or-the-other relationship between the individual item and either a PO or Lease, but hopefully prevent linking to both, which would be a fault (meaning an item cannot be both on PO and Lease). I thought an intermediate table might be best, but I don't have it square in my head..
Any suggestions?