SHOW ALL SQL COMMANDS STEP BY STEP Specify the following updates using the SQL u
ID: 3829522 • Letter: S
Question
SHOW ALL SQL COMMANDS STEP BY STEP
Specify the following updates using the SQL update commands. Show the state of each relation after the update.
Insert <‘Robert’,‘F’,‘Scott’,‘943775543’,‘1972-06-21’,‘2365 Main St, Bellaire, TX’,M,58000,‘888665555’, 1> into EMPLOYEE.
Insert <‘453453453’,‘John’,‘M’,‘1990-12-12’,‘spouse’> into DEPENDENT.
Delete the WORKS_ON tuples with Essn = ‘333445555’.
Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber = 5 to ‘123456789’and ‘2007-10-01’, respectively.
Modify the Hours attribute of the WORKS_ON tuple with Essn = ‘999887777’and Pno = 10 to ‘5.0’.
EMPLOYEE Frame Minit Lname Ssn Bdate Address Sex alary Super Stan Dno DEPARTMENT Dname Onumber Mar ssn Mar start d DEPT LOCATIONS pnumber location PROJECT WORKS ON Hours Figure 3.5 Schema diagram for the DEPENDENT COMPANY relational Essn Dependent name Sex Bdate Relationship database schema.Explanation / Answer
This will insert the new record into the database table.
This will insert the new record into the table DEPENDENT.
This will delete the record with that particular Essn number in the works_on table.
This is the update statement which updates the record with Dnumber 5.
This will update the hours attribute for that particular Employee in the works on table.
Update WORKS_ON set Hours=5.0 where Essn = ‘999887777’and Pno = 10;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.