Question: Consider the following schema: Suppliers( sid: integer, sname: string, address: string) Parts(pid: integer, pname: string, color: string) Catalog( sid: integer, pid: integer, cost: real) The

Consider the following schema:

Suppliers( sid: integer, sname: string, address: string)

Parts(pid: integer, pname: string, color: string)

Catalog( sid: integer, pid: integer, cost: real)

The Catalog relation lists the prices charged for parts by Suppliers.

Write the MySQL statements required to create these relations, including appropriate primary and foreign key integrity constraints, then Write the insert statements to insert the following data into these relations: (30 points)

Suppliers

1,Acme Widget Suppliers,"1 Grub St., Potemkin Village, IL 61801"

2,Big Red Tool and Die,"4 My Way, Bermuda Shorts, OR 90305"

3,Perfunctory Parts,"99999 Short Pier, Terra Del Fuego, TX 41299"

4,Alien Aircaft Inc.,"2 Groom Lake, Rachel, NV 51902"

Parts

1,Left Handed Bacon Stretcher Cover,Red

2,Smoke Shifter End,Black

3,Acme Widget Washer,Red

4,Acme Widget Washer,Silver

5,I Brake for Crop Circles Sticker,Translucent

6,Anti-Gravity Turbine Generator,Cyan

7,Anti-Gravity Turbine Generator,Magenta

8,Fire Hydrant Cap,Red

9,7 Segment Display,Green

Catalog

1,3,0.50

1,4,0.50

1,8,11.70

2,3,0.55

2,8,7.95

2,1,16.50

3,8,12.50

3,9,1.00

4,5,2.20

4,6,1247548.23

4,7,1247548.23

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!