Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 3 - Integrity conditions: In the warehouse database again the following relations are given: Warehouse : {[WName, Location]} Product: [[PName, Abbreviation. Price, Category, Warehouse.

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Prepare an electronic rsum.

Answered: 1 week ago

Question

Strengthen your personal presence.

Answered: 1 week ago

Question

Identify the steps to follow in preparing an oral presentation.

Answered: 1 week ago