6. Consider the following scenario from your textbook on page 118 dealing with a chain of hotels that need to manage the
Posted: Thu Jul 14, 2022 2:28 pm
6. Consider the following scenario from your textbook on page118 dealing with a chain of hotels that need to manage the bookingsof their guests into rooms at specific hotels in the chain. Thehotel chain maintains four tables in order to manage thisinformation: Hotel(hotelNo, hotelName, city) Room(roomNo, hotelNo,type, price) Booking(hotelNo, guestNo, dateFrom, dateTo, roomNo)Guest(guestNo, guestName, guestAddress, guestPhoneNo, guestEmail)The underlined attribute(s) of each relation form the primary keyof the relation.
a. Identify foreign key relations in the tables that will allowthe appropriate referential integrity rules to be applied. For eachforeign key relation, specify the referring table, the primarytable, and the attributes that form the foreign key in thereferring table. For example, a guest should not be booked into anon-existing room at a hotel. A guest should not be booked into aroom unless there is information about the guest.
For the remaining questions, use thefollowing set of relational database tables to the results for therelational algebra expressions.
R2
C
D
E
F
2
s
11
t
4
e
8
d
9
h
15
k
R3
F
G
H
j
y
i
s
t
f
t
f
s
x
b
o
d
a
w
R1
A
B
C
D
1
e
4
e
2
g
9
g
3
x
13
f
a. Identify foreign key relations in the tables that will allowthe appropriate referential integrity rules to be applied. For eachforeign key relation, specify the referring table, the primarytable, and the attributes that form the foreign key in thereferring table. For example, a guest should not be booked into anon-existing room at a hotel. A guest should not be booked into aroom unless there is information about the guest.
For the remaining questions, use thefollowing set of relational database tables to the results for therelational algebra expressions.
R2
C
D
E
F
2
s
11
t
4
e
8
d
9
h
15
k
R3
F
G
H
j
y
i
s
t
f
t
f
s
x
b
o
d
a
w
R1
A
B
C
D
1
e
4
e
2
g
9
g
3
x
13
f