Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the schemas and instances below. #prod should be prodid . . #dep should be depid. . The primary key of product is prodid.

Consider the schemas and instances below.  #prod should be prodid . . #dep should be depid. . The primary key Schemas: - Product(#prod, pname, price) - Depot (#dep, addr, volume) Stock(#prod, #dep, quantity) Instances: 1. Write the code that will create the tables: product, depot and stock, and populate them with the provided

Consider the schemas and instances below. #prod should be prodid . . #dep should be depid. . The primary key of product is prodid. The primary key of depot is depid. The (composite) primary key of stock is prodid, depid. prodid in stock is a foreign key referring the primary key prodid in product. . depid in stock is a foreign key referring the primary key depid in depot. Schemas: - Product(#prod, pname, price) - Depot (#dep, addr, volume) Stock(#prod, #dep, quantity) Instances: Product #prod pname price tape 2.5 250 80 pl p2 p3 Depot #dep d1 pl pl vcr pl p3 p3 p2 p2 p2 addr New York d2 d4 Stock #prod #dep quantity d1 1000 d2 -100 d4 1200 d1 3000 d4 2000 d4 1500 dl -400 d2 2000 volume 9000 6000 2000 Syracuse New York 1. Write the code that will create the tables: product, depot and stock, and populate them with the provided data following the instructions

Step by Step Solution

3.46 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

The answer provided below has been developed in a clear step by step manner Step 1 1st table Product... 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

Research Methods For Business Students

Authors: Mark Saunders, Philip Lewis, Adrian Thornhill

8th Edition

1292208783, 978-1292208787

More Books

Students also viewed these Databases questions