EE436L: Database Engineering: Lab Manual
EE436L: Database Engineering: Lab Manual
EE436L: Database Engineering: Lab Manual
EE436L: Database
9 Engineering
Department of Electrical Engineering
University of Engineering and Technology Lahore 2020
Instructor: Mr. Umer Shahid
Name
Registration Number _
Please write the following queries to create and access the views on the database that you
are using in last 2 labs.
I. Use views to list the details of all rooms at the Marriott Hotel, including the name of the
guest(s) staying in the room, if the room is occupied and the prices of the rooms.
(VIEW1)
1
II. Use View to List the names and addresses of all guests in London, alphabetically ordered
by name. (VIEW2)
III. Use View to List the bookings for which no dateTo has been specified. (VIEW3)
IV. Insert a new tuple in VIEW2 by using “INSERT INTO VIEW2” command and check if
new data has updated the original table or not.
V. Update the price of all rooms in VIEW1 and check if update operation is performed on
original database or not.
VI. Create a trigger to audit the changes of the employee table. First, create an employee
table with appropriate attributes. Then, create an employeeAudit table that keeps the
changes in the employee table. Add appropriate attributes in the table. In order to fetch
the details of trigger, you may refer the following link:
https://www.w3resource.com/mysql/mysql-triggers.php