Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 4 4 5 5 Read the entire document and solve all questions and show al MYSQL steps and codes please!!!! Figure: One possible database

image text in transcribedimage text in transcribed

4 4 4 5 5 Read the entire document and solve all questions and show al MYSQL steps and codes please!!!! Figure: One possible database state for the COMPANY relational database schema. EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super_ssn Dno John B Smith 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 5 Franklin TWong 333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 5 Alicia J Zelaya 999887777 1968-01-19 3321 Castle, Spring, TX F 25000 987654321 Jennifer S Wallace 987654321 1941-06-20 291 Berry, Bellaire, TX F43000 888665555 4 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 333445555 5 Joyce A English 453453453 1972-07-31 5631 Rice, Houston, TXF 25000 333445555 5 Ahmad V Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 25000 987654321 James E Borg 888665555 1937-11-10 450 Stone, Houston, TXM 55000 NULL 1 DEPARTMENT DEPT_LOCATIONS Dname Dnumber Mgr_ssn Mgr_start_date Dnumber Dlocation Research 5 333445555 1988-05-22 1 Houston Administration 4 987654321 1995-01-01 Stafford Headquarters 1 888665555 1981-06-19 Bellaire Sugarland 5 Houston WORKS ON PROJECT Essn Hours Pname Pnumber Plocation Dnum 123456789 1 32.5 ProductX Bellaire 5 123456789 2 7.5 ProductY 2 Sugarland 5 666884444 3 40.0 Productz 3 Houston 5 453453453 1 20.0 Computerization 10 Stafford 4 453453453 2 20.0 Reorganization 20 Houston 1 333445555 2 10.0 Newbenefits 30 Stafford 4 333445555 3 10.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent_name Sex Bdate Relationship 999887777 30 30.0 333445555 Alice F 1986-04-05 Daughter 999887777 10 333445555 Theodore M 1983-10-25 Son 987987987 10 35.0 333445555 Joy F 1958-05-03 Spouse 987987987 30 5.0 987654321 Abner M 1942-02-28 Spouse 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice F 1988-12-30 Daughter 888665555 20 NULL 123456789 Elizabeth F 1967-05-05 Spouse Pno 1 10.0 1. Suppose each of the following Update operations is applied directly to the database of above Figure, Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints: a. Insert into EMPLOYEE. b. Insert into PROJECT. c. Insert into DEPARTMENT. d. Insert into WORKS_ON. e. Insert into DEPENDENT. f. Delete the WORKS_ON tuples with Essn = '333445555'. g. Delete the EMPLOYEE tuple with Ssn = '987654321'. h. Delete the PROJECT tuple with Pname = 'ProductX'. i. Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber = 5 to '123456789' and '2007-10-01', respectively. j. Modify the Super_ssn attribute of the EMPLOYEE tuple with Ssn = '999887777' to '943775543'. k. Modify the Hours attribute of the WORKS_ON tuple with Essn = "999887777' and Pno = 10 to '5.0'. 1 i) Consider the relation CLASS (Course#, Univ_Section#, Instructor_name, Semester, Building_code, Room#, Time_period, Weekdays, Credit_hours). This represents classes taught in a university, with unique Univ_section#s. Identify and list what you think should be various candidate keys, and write in your own words the conditions or assumptions under which each candidate key would be valid

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

1. Consider the following program: 6 I=0; While (l

Answered: 1 week ago