Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following six relations for an order-processing database applicatio

ID: 3876325 • Letter: C

Question

Consider the following six relations for an order-processing database

application in a company:

CUSTOMER (Cust#, Cname, City)

ORDER (Order#, Odate, Cust#, OrdAmt)

ORDERITEM (Order#, Item#, Qty)

ITEM (Item#, Unitprice)

SHIPMENT (Order#, Warehouse#, Shipdate)

WAREHOUSE (Warehouse#, City)

Here, OrdAmt refers to total dollar amount of an order; Odate is the

date the order was placed; Shipdate is the date an order is shipped

from the warehouse. Assume that an order can be shipped from several

warehouses

Give an update operation to a database state that

violates an integrity constraint that is neither of the previous

kinds of constraints, stating any assumptions you make.

Explanation / Answer

Integrity constraint violations occur when an insert, update, or delete statement violates a primary key, foreign key, check, or unique constraint or a unique index.

When ORDERITEM (Order#, Item#, Qty) updates against the shipment by different where house the Order# will duplicate.

When SHIPMENT (Order#, Warehouse#, Shipdate) updates against the shipment by different where house the Order# will duplicate.