DBMS Lab Assignment 2
DBMS Lab Assignment 2
23C4130
Ques 1: Identifying Database Objects,Attributes and constraints.
Attributes are under Field column, their data type in second.Constraint=NULL,KEY,DEFAULT.
Ques 3:
a. Insert <‘Robert’, ‘F’, ‘Scott’, ‘943775543’, ‘1972-06-21’, ‘2365 Newcastle Rd, Bellaire, TX’, M,
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.
L . Retrieve the names of all employees in department 5 who work more than 10 hours per
week on the ProductX project.
m. List the names of all employees who have a dependent with the same first name as
themselves.
NONE EXIST
n. Find the names of all employees who are directly supervised by ‘Franklin Wong’.
o. Retrieve the name and address of all employees who work for the ‘Research’ department.
p. For every project located in ‘Stafford’, list the project number, the controlling department
number, and the department manager’s last name, address, and birth date.
q.dbt
For each employee, retrieve the employee’s first and last name and the first and last name of hisor her
immediate supervisor.
r. Make a list of all project numbers for projects that involve an employee whose last name is
‘Smith’, either as a worker or as a manager of the department that controls the project.
u.Show the resulting salaries if all employees working on ProductX are given a 10% raise.
or
select fname,lname from employee where ssn not in (select mgrssn from department);