Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help me with the following and I will give like and feedback, thanks! There are table manager and building defined by the statements CREATE
please help me with the following and I will give like and feedback, thanks!
There are table manager and building defined by the statements CREATE TABLE manager managerid CHAR(4) PRIMARY KEY, mname VARCHAR(15) NOT NULL, mresbuildingid CHAR(3)); CREATE TABLE building ( buildingid CHAR(3) PRIMARY KEY, bmanagerid CHAR(4) NOT NULL, FOREIGN KEY (bmanagerid) REFERENCES manager (managerid) ON DELETE NO ACTION ON UPDATE NO ACTION); ALTER TABLE manager ADD FOREIGN KEY(mresbuildingid) REFERENCES building buildingid); Note that the "manager" table has a foreign key that references the "building" table and "building" has a foreign key that references "manager". This is a circular foreign key dependency. A new building is constructed with buildingid = 'B10: Thomas Stevens is hired as manager with managerid="M75! Thomas also lives in building B10. What is a correct sequence of SQL statements to add this data to the tables? insert into manager values ('M75, Thomas Stevens, '310'); insert into building values ('310', 'M75'); insert into manager (managerid, mname) values ('M75: Thomas Stevens"); insert into building values ('310', 'M75'); update manager set mresbuildingid = '310' where managerid="M75; insert into building values ('B10, "M75'); insert into manager values ('M75, 'Thomas Stevens, '310')Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started