Describe the relations that would be produced by the following tuple relational calculus expressions:

(a) {H.hotelName | Hotel(H) ? H.city = ‘London’}
(b) {H.hotelName | Hotel(H) ? (?R) (Room(R) ? H.hotelNo ? R.hotelNo?? R.price ?50)}
(c) {H.hotelName | Hotel(H) ? (?B) (?G) (Booking(B) ? Guest(G) ? H.hotelNo ?
B.hotelNo?? B.guestNo = G.guestNo ?? G.guestName = ‘John Smith’)}
(d) {H.hotelName, G.guestName, B1.dateFrom, B2.dateFrom | Hotel(H) ? Guest(G) ?
Booking(B1) ? Booking(B2) ? H.hotelNo ? B1.hotelNo??
G.guestNo = B1.guestNo ?? B2.hotelNo = B1.hotelNo ?
B2.guestNo = B1.guestNo ?? B2.dateFrom ? B1.dateFrom}


(a) {H.hotelName | Hotel(H) ? H.city = ‘London’}
This will produce a relation containing the names of all hotels in London.
(b) {H.hotelName | Hotel(H) ? (?R) (Room(R) ? H.hotelNo ? R.hotelNo?? R.price ?50)} This will produce a relation containing the names of all hotels that have a room price
above £50.
(c) {H.hotelName | Hotel(H) ? (?B) (?G) (Booking(B) ? Guest(G) ? H.hotelNo ?
B.hotelNo?? B.guestNo = G.guestNo ?? G.guestName = ‘John Smith’)}
This will produce a relation containing the names of all hotels that have a booking for
a guest called John Smith.
(d) {H.hotelName, G.guestName, B1.dateFrom, B2.dateFrom | Hotel(H) ? Guest(G) ?
Booking(B1) ? Booking(B2) ? H.hotelNo ? B1.hotelNo??
G.guestNo = B1.guestNo ?? B2.hotelNo = B1.hotelNo ?
B2.guestNo = B1.guestNo ?? B2.dateFrom ? B1.dateFrom}
This will produce a relation containing the names of guests who have more than one booking at the same hotel, along with the hotel number and the dates of the bookings.

Computer Science & Information Technology

You might also like to view...

Is each of the following an absolute pathname, a relative pathname, or a simple filename?

a. milk_co b. correspond/business/milk_co c. /home/max d. /home/max/literature/promo e. .. f. letter.0210

Computer Science & Information Technology

In a letter, the space between the date line and the inside address can range from 1 to 10 blank lines, depending on the length of the letter

Indicate whether the statement is true or false

Computer Science & Information Technology

The user can utilize the horizontal scroll bar to move up and down to view information that extends beyond the top or bottom of the screen

Indicate whether the statement is true or false

Computer Science & Information Technology

When a Total row summary function is inserted at the bottom of a table column and the summary function COUNT is selected, the displayed value of the COUNT function represents the number of ________

A) cells in the entire table B) cells in the column that contain a text value C) the number of cells in the column that contain a number value D) rows in the entire table

Computer Science & Information Technology