Question: Create a database following the relations given below. Be sure to specify any constraints. Then use the given code to insert items into your database.

Create a database following the relations given below. Be sure to specify any constraints. Then
use the given code to insert items into your database. For this question, submit an SQL code file,
and a screen shot of the ERD created by XAMPP.
Populate Database:
INSERT INTO Dept VALUES ('Accounting',null);
INSERT INTO Dept VALUES ('Research',null);
INSERT INTO Dept VALUES (Computer Science,null);
INSERT INTO Worker VALUES(101,'Smith','Tom', 06061993,02011970,85000,
'Computer Science');
INSERT INTO Worker VALUES(103,'Jones','Rachel', 09202005,06151975,48000,
'Accounting');
INSERT INTO Worker VALUES(110,'Burns','Jane', 0612000,09211980,39000,
'Accounting');
INSERT INTO Worker VALUES (108,Kranz,Amanda,09192008,01301979,49500,
Computer Science);
INSERT INTO Worker VALUES(105,'Lewis','Michael', 09102010,04051977,70000,
'Research');
INSERT INTO Worker VALUES(115,'Chin','Lauren', 06192014,09221980,
60000,'Research');
UPDATE Dept SET mgrId =103 WHERE deptName = 'Accounting';
UPDATE Dept SET mgrId =115 WHERE deptName = 'Research';
UPDATE Dept SET mgrId =101 WHERE deptName =Computer Science;
INSERT INTO Project VALUES (1001, 'Jupiter', 02012018,300000,50,101);
INSERT INTO Project VALUES (1005, 'Saturn', 06012018,400000,35,103);
INSERT INTO Project VALUES (1019, 'Mercury', 02152018,350000,40,115);
INSERT INTO Project VALUES (1025, 'Neptune', 02012018,600000,45,110);
INSERT INTO Project VALUES (1030, 'Pluto', 09152018,380000,50,108);
INSERT INTO Project VALUES (1011,Venus,07222017,420000,48,110);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!