Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Logical - Physical Design Transition Problem
Hello,
I am running into problems trying to create integrity constraints to model the following problem. I think I am missing some fundamental RDB principle but can't see what it is!! Has anyone any ideas ??
In the Logical model we have identified four Entities - Customer, Warehouse, Order and Shipment. They are related as follows,
Customer has many Warehouses
Warehouse belongs to one Customer
Customer has many Orders
Order is for one Customer
Order has many Shipments
Shipment is for one Order
Shipment is sent to one Warehouse
Warehouse receives goods from many Shipments
At first glance it seems easy as most of the referential integrity constraints are basic one to many.
However, the rule I cannot enforce is that Shipments must be sent to a Warehouse owned by the Customer that placed the Order. For example, the .db should not let you create a shipment record for Order A & Warehouse B if Warehouse B is not owned by the Customer placing Order A.
Matt. Received on Wed May 19 1999 - 07:13:09 CDT