The document contains SQL commands to create three tables: department, employee, and dependent, with specified fields and primary/foreign key constraints. It also includes several INSERT statements to add dependent records for employees and UPDATE statements to modify employee salary and department manager information. The structure supports a relational database for managing employee and department data along with their dependents.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
24 views2 pages
DBMS Lab 2
The document contains SQL commands to create three tables: department, employee, and dependent, with specified fields and primary/foreign key constraints. It also includes several INSERT statements to add dependent records for employees and UPDATE statements to modify employee salary and department manager information. The structure supports a relational database for managing employee and department data along with their dependents.
INSERT INTO dependent VALUES (333445555,'ALICE','F','1976-04-05','DAUGHTER');
INSERT INTO dependent VALUES (333445555,'THEODORE','M','1973-10-25','SON'); INSERT INTO dependent VALUES (333445555,'JOY','F','1948-05-03','SPOUSE'); INSERT INTO dependent VALUES (123456789,'MICHAEL','M','1978-01-01','SON'); INSERT INTO dependent VALUES (123456789,'ALICE','F','1978-12-31','DAUGHTER'); INSERT INTO dependent VALUES (123456789,'ELIZABETH','F','1957-05-05','SPOUSE'); INSERT INTO dependent VALUES (987654321,'ABNER','M','1932-02-26','SPOUSE');
UPDATE employee SET salary = 35000 WHERE ssn = 123456789;
UPDATE department SET mgrssn = 987987987 WHERE dname = 'RESEARCH';