You are on page 1of 1

Mekelle Institute of Laboratory manual for

Technology(MIT) Database Management


Mekelle,Tigray ,Ethiopia Systems(DBMSs)

Lab manual : 7

1. Create a view called ‘EmpView’ containing all columns of the Employee table.
2. Create a view called ‘EmployeeView’ containing some selected columns of the
Employee table.
3. Create a view called ‘EmpDeptView’ containing all columns of the Employee and
Department tables.
4. Create a view with the name ‘Empdeptview’ from the base tables Employee and
Department so that the view should contain the employee’s id, first and last name and
their respective departments.
5. Display the description of the view that you created in question 1.
6. Execute all the DML statements on EmpView and EmpDeptView and observe the
change in the views themselves and on the base tables.
7. Try to retrieve values from your view. Can you see some advantage of views here?
8. Drop the view ‘EmpView’. After dropping the view, try to retrieve some values from
the view.
9. Create an index called ‘emp_age_index’ on the emp_age column of the Employee
table and see the description of the employee table. What do you think the importance
of creating index is?
10. Create an index with the name ‘emp_names_index’ on the columns emp_fname and
emp_lname of the Employee table.
11. Drop the emp_age_index .Then try to describe the employee table and observe the
change.
12. Retrieve the details of the employees whose first name contains up to 5 characters.
13. Display the first name, last name and age of the employee whose first name contains
maximum number of characters.
14. Display the employee first names in small letters and their corresponding last names
in capital letters.
15. Display the first name of the employee in capital letters, last name in small letters of
the employee whose first name contains maximum number of characters.

You might also like