Question: Task 3 - Integrity conditions: In the warehouse database again the following relations are given: Warehouse : {[WName, Location]} Product: [[PName, Abbreviation. Price, Category, Warehouse.
Task 3 - Integrity conditions: In the warehouse database again the following relations are given: Warehouse : \{[WName, Location]\} Product: [[PName, Abbreviation. Price, Category, Warehouse. WName]] Review : [[RID, Text, Rating, Product.PName]\} Sales : \{[Product.PName, Year, Quantity]\} Complete the SQL commands on page 12f. that create the tables Warehouse, Product. Review and Sales. Thereby, consider the following constraints: - Primary keys of tables are underlined in the relational schema. - Foreign key relationships in the relational schema which are stated in the form of Table.Attribute (e.g. for Product: Warehouse.WName), must be expressed through referential constraints. - Specify meaningful data types for attributes, e.g., VARCHAR(20), INTEGER, FLOAT, DATE, TIME, BLOB, ... * "Price" can be a decimal number. * "Text" is the only optional attribute in the entire schema. - The abbreviation of a product is unambiguous (i.e., two products cannot have the same abbreviation). - Quantity" is a natural number (N0). - "Category " can take one of the following values: "Electronics", ,Food ", "Drug". - "Rating " may only take a whole number between 1 and 5 . - When a Product is deleted, all corresponding entries in Review should also be removed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
