Question: Use the relation schemas below to write a SQL statement to create Item table, specify primary key and foreign keys as necessary. ListPrice and UnitCost
Use the relation schemas below to write a SQL statement to create Item table, specify primary key and foreign keys as necessary. ListPrice and UnitCost cannot be a negative number or 0. Name cannot be null. ListPrice is always higher than UnitCost. For the foreign key Supplier (references Suppplier(SuppID)), set CASCADE on update and SET NULL on delete.
Category(CategoryID, Name, Descn)
Product(ProductID, CategoryID FK ref Category(CategoryID), Name Descn, Image)
Item(ItemID, ProductID FK ref Prodcut(ProductID), ListPrice, UnitCost, Supplier FK ref Supplier(SuppID), status, name, image)
Supplier(SuppID, name, status, addr1, addr2, city, state, zip, phone)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
