DB Tut5
DB Tut5
DB Tut5
where Hotel contains hotel details and hotelNo is the primary key;
Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;
Booking contains details of bookings and (hotelNo, guestNo, dateFrom) forms the primary key;
Guest contains guest details and guestNo is the primary key.
where Book contains details of book titles in the library and the ISBN is the key.
BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a
foreign key identifying the book title.
Borrower contains details of library members who can borrow books and borrowerNo is the key.
BookLoan contains details of the book copies that are borrowed by library members and
copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower.
a. List all employees in alphabetical order of surname, and then first name.
c. List the names and addresses of all employees who are Managers.
d. Produce a list of the names and addresses of all employees who work for the IT department.
4.
Figure 4.0
a. Based on above Instructor relation, what will be the query for the result as shown in Figure 4.0?
b. Find the names of all instructors in the Computer Science department who have salary greater than
$70,000.