Additional DBMS Lab
Additional DBMS Lab
Entity-Relationship Diagram
Schema Diagram
Table Creation
2. Find the name and numbers of all salesmen who had more than one customer.
3. List all salesmen and indicate those who have and don’t have customers in their
cities (Use UNION operation.)
(Note: Before executing this for the exam first display all the table then executes the query
and show the changes it has made in all the table to the customer. Remember only salesmen and
all his order must get deleted not the customer)
2. Consider the schema for Company Database:
NOTE: Once DEPARTMENT and EMPLOYEE tables are created we must alter
EMPLOYEE table to add foreign key constraint to EMPLOYEE. Dno using sql
command.
TABLE CREATION
NOTE: Once DEPARTMENT and EMPLOYEE tables are created we must alter
EMPLOYEE table to add foreign key constraint to EMPLOYEE.Dno using sql
command.
// FOR MYSQL:
//ORACLE:
1. Make a list of all project numbers for projects that involve an employee whose last
name is ‘Scott’, either as a worker or as a manager of the department that controls
the project.
2. Show the resulting salaries if every employee working on the ‘IoT’ project is givena
10 percent raise.
3. Find the sum of the salaries of all employees of the ‘Accounts’ department, as well as
the maximum salary, the minimum salary, and the average salary in this
department
(Note: In project table give only one project controlled by Dept No 5.)
5. For each department that has more than five employees, retrieve the department
number and the number of its employees who are making more than Rs. 6,00,000.