Professional Documents
Culture Documents
Company Database
Employee (SSN, Name (fname, Minit, Lname), Sex, Address, salary,
DOB, Department, designation, SupervisorSSN)
Department (Number, Name, ManagerSSN, Manager_DOB, Location)
Dependent (Name, DOB, Sex, Relationship, Employee SSN)
Project (Number, Name, Location, Controlling Department, Budget)
Works_on (SSN, Project Num, Hours)
a) Identify the appropriate primary keys for the tables. It is self-explanatory.
b) Insert at least 10 rows to each table. (Apply Interactive insertion.)
10. Ensure that the location of the project can only be from ‘Chennai’,
‘Hyderabad’, ‘Cochin’, ‘Bangalore’ and ‘Mumbai’.
CYCLE SHEET– II
1. List the project number, controlling department number and manager Name,
address.
2. List the name and address of all employees who work for MCA Department.
3. List the project numbers that involve an employee whose last name is “Smith”
4. Retrieve the Names of the employees whose salary is greater than the salary
of all employees in department no 5.
5. Retrieve the employee name that has a dependent with same first Name and
same sex as the employee.
6. Retrieve the name of each employee who works on all projects Controlled by
department number 5.
7. Retrieve the employee names that have no dependents.
8. List the managers who have at least one dependent.
9. Retrieve the employee names that have at least two dependents.
10. Retrieve the project number, project name and the number of Employees
working on that project.
11. Retrieve the project number, name and number of employees for which more
than two employees are working.
12. Retrieve the department number and number of employees for which more
than five employees are working with salary > 40000.
13. Find the employee names who are working for the projects owned by the
department which is making the highest revenue from sponsored projects.
CYCLE SHEET– III
V. Miscellaneous
VI. PL/SQL
1. Write a PL/SQL block to display the reverse of numbers between 1 and 100.
3. Write a PL/SQL program to get the employee number and print the employee
details like ename, sex, address and designation.
4. Write a PL/SQL program to get the employee number and check that the
employee has got salary more than 50000. Otherwise, print the suitable
message to denote that the employee is getting salary less than 50000.
5. Write a PL/SQL program to find that how many projects has been operating in
the location ‘Hyderabad’.