2 BSC02 DBMS Guidelines 2020
2 BSC02 DBMS Guidelines 2020
List of Practicals
DDL Commands
1
•Create table, alter table, drop table
DML Commands
•Nested select statements•Set manipulation using (any, in, contains, all, not in, not
contains, exists, not exists, union, intersect, minus, etc.)
2
List of sample queries to be done using above schema
3. Retrieve the birthdate and address of the employee whose name is 'Franklin T. Wong'
11. Retrieve the name and address of all employees who work for the 'Research'
department
12. For every project located in 'Stafford', list the project number, the controlling
department number, and the department manager's last name, address, and birthdate.
13. For each employee, retrieve the employee's name, and the name of his or her
immediate supervisor.
15. Make a list of all project numbers for projects that involve an employee whose last
name is 'Narayan’ either as a worker or as a manager of the department that controls the
project.
16. Increase the salary of all employees working on the 'ProductX' project by 15%.
Retrieve employee name and increased salary of these employees.
3
17. Retrieve a list of employees and the project name each works in, ordered by the
employee's department, and within each department ordered alphabetically by employee
first name.
18. Select the names of employees whose salary does not match with salary of any
employee in department 10.
19. Retrieve the name of each employee who has a dependent with the same first name
and same sex as the employee.
20. Retrieve the employee numbers of all employees who work on project located in
Bellaire, Houston, or Stafford.
21. Find the sum of the salaries of all employees, the maximum salary, the minimum
salary, and the average salary. Display with proper headings.
22. Find the sum of the salaries and number of employees of all employees of the
‘Marketing’ department, as well as the maximum salary, the minimum salary, and the
average salary in this department.
23. Select the names of employees whose salary is greater than the average salary of all
employees in department 10.
24. For each department, retrieve the department number, the number of employees in the
department, and their average salary
25. For each project, retrieve the project number, the project name, and the number of
employees who work on that project.
26. Change the location and controlling department number for all projects having more
than 5 employees to ‘Bellaire’ and 6 respectively.
27. For each department having more than 10 employees, retrieve the department no, no
of employees drawing more than 40,000 as salary.
29. For each department find number of female and number of male employees .
30. Find the name and age of youngest employee in each department.