Question 3 2 2 8 12 Marks 1 Consider Suppliers Parts Database Given Part Supplier Snum Sn Q43798013
Question 3 [ 2+2+ 8 = 12 marks 1 Consider the Suppliers-and-Parts database given below. Part Supplier SNUM SNAME LOCATION SI Smith London, UK PNUMPNAME COLOR WEIGHT LOCATION PINut Red 12 London, UK P2 Bolt Green 17 Paris, France P3 Screw Blue 17 London, UK P4 Screw Red 14 Paris, France Jones Paris, France S2 S3 Blake Paris, France Shipment Attribute SNUM, LOCATION, PNUM, COLOR Format Characters: size 25 max SNUM PNUM QTY SIPI 300 SIP2 200 SIP3400 SI P4 NULL S2 PL300 S2P2400 S3 P2 200 QTY, WEIGHHT SNAME Integer Characters: max size 25 (Unique) PARTA Specify the candidate key(s) (if any) of Supplier relation PART B Specify the foreign keys (if any) for each relation above. PARTC Suppose that each of the following operations is applied directly to the Suppliers-and-Parts database. For each operation, indicate whether this operation will be successful i.e. will lead to a valid relation state or not), if not, specify the reason(s). a. insert into Supplier values (’54’, ‘Smith’, ‘Manama, Bahrain’); Successful operation: (YES/NO) If NO, WHY a. Delete all Shipment tuples with PNUM=’P1′; Successful operation: (YES/NO) If NO, WHY b. insert into Shipment values (‘Si’, ‘P4’, ‘300 pe’); Successful operation: (YES/NO) If NO, WHY Show transcribed image text Question 3 [ 2+2+ 8 = 12 marks 1 Consider the Suppliers-and-Parts database given below. Part Supplier SNUM SNAME LOCATION SI Smith London, UK PNUMPNAME COLOR WEIGHT LOCATION PINut Red 12 London, UK P2 Bolt Green 17 Paris, France P3 Screw Blue 17 London, UK P4 Screw Red 14 Paris, France Jones Paris, France S2 S3 Blake Paris, France Shipment Attribute SNUM, LOCATION, PNUM, COLOR Format Characters: size 25 max SNUM PNUM QTY SIPI 300 SIP2 200 SIP3400 SI P4 NULL S2 PL300 S2P2400 S3 P2 200 QTY, WEIGHHT SNAME Integer Characters: max size 25 (Unique) PARTA Specify the candidate key(s) (if any) of Supplier relation PART B Specify the foreign keys (if any) for each relation above. PARTC Suppose that each of the following operations is applied directly to the Suppliers-and-Parts database. For each operation, indicate whether this operation will be successful i.e. will lead to a valid relation state or not), if not, specify the reason(s). a. insert into Supplier values (’54’, ‘Smith’, ‘Manama, Bahrain’); Successful operation: (YES/NO) If NO, WHY a. Delete all Shipment tuples with PNUM=’P1′; Successful operation: (YES/NO) If NO, WHY b. insert into Shipment values (‘Si’, ‘P4’, ‘300 pe’); Successful operation: (YES/NO) If NO, WHY
Expert Answer
Answer to Question 3 [ 2+2+ 8 = 12 marks 1 Consider the Suppliers-and-Parts database given below. Part Supplier SNUM SNAME LOCATIO…
OR