Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 2 + 2 + 8 = 12 marks 1 Consider the Suppliers-and-Parts database given below. Part SNAME LOCATION Supplier SNUM SI S2 S3

image text in transcribed
image text in transcribed
Question 3 2 + 2 + 8 = 12 marks 1 Consider the Suppliers-and-Parts database given below. Part SNAME LOCATION Supplier SNUM SI S2 S3 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 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 S2 P2400 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 Question 3 [ 9+ 3 = 12 marks Department (DeptID:int, DeptName: string; College: string) Faculty (FID: int, Fname: string, DeptID: int) Workshop (WorkshopName: string, DeptID: int, SuperviorID:int, workshop Date: date) // workshopDate is unique; Format: dd-mmm-yyyy (for example: 19-Nov-2014) The database shown above models the concept of workshops conducted by departments within a university. It is assumed that the university has multiple departments stored in "Department" relation, and multiple faculty stored in "faculty" relation. The supervisor of a workshop is a faculty. Part (A) 9 marks Based on the database above, answer the following questions (YES/ NO), and explain why with respect to Relational Integrity Constraints. 1. Is it possible for two different workshops in the university to have the same name? [ YES / NO ] - Why? 2. Is it possible for a workshop to have more than one supervisor? [ YES/NO) -Why? 3. Is it possible for a workshop to be organized by a new department with unknown ID? (YES / NO ]-Why? Part (B/ 3 marks Using the workshop relation, identify the candidate key(s) and alternate key(s) if any. Candidate Key(s) : Alternate Key(s)

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_2

Step: 3

blur-text-image_3

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions