Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify given TABLE statement as follows. If the relation has one or more keys then modify the CREATE TABLE statement to declare one PRIMARY KEY

Modify given TABLE statement as follows.

If the relation has one or more keys then modify the CREATE TABLE statement to declare one PRIMARY KEY and to declare all other keys as NOT NULL.

For each referential integrity constraint that should hold in your schema, specify the constraint

using a REFERENCES clause within the appropriate CREATE TABLE statement.


You may use the default option for handling referential integrity violations (violations will generate an error). We expect that everyone's PDA should include at least one referential 

Tables_page-0001.jpg

integrity constraint. Add at least two attribute-based CHECK constraints to relations of your database schema.
 

S# SNAME STATUS CITY S1 SMITH 20 LONDON S2 JONES 10 PARIS S3 BLAKE 30 PARIS S4 CLARKE 20 LONDON S5 ADAMS 30 ATHENS Supplier (S) S# P# Qty S1 P1 300 S1 P2 200 S1 P3 400 S1 P4 200 S1 P5 100 S1 P6 100 S2 P1 300 S2 P2 400 S3 P2 200 S4 P2 200 S4 P4 300 S4 P5 400 SP P# Pname Colour Weight City P1 BOLT blue 10 London P2 NUT black 5 Paris P3 WASHER black 2 London P4 NUT red 6 Athens P5 CAM red P6 NUT blue 10 5 Paris London Parts (P)

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

Financial Accounting Tools for Business Decision Making

Authors: Paul D. Kimmel, Jerry J. Weygandt, Donald E. Kieso, Barbara Trenholm, Wayne Irvine

7th Canadian edition

1119368456, 978-1119211587, 1119211581, 978-1119320623, 978-1119368458

More Books

Students also viewed these Databases questions