Question: ou are asked to design the database structure for an international hotel chain. The following is a list of requirements for the design that you
ou are asked to design the database structure for an international hotel chain. The following is a list of requirements for the design that you have to model.
The hotel chain owns many hotels
Each hotel has the following attributes: a unique building ID bID a name that is not necessarily unique, country, state, city and street address.
A hotel contains a set of rooms, each with a room number. Different hotels can have rooms with the same number but within a hotel the number is unique.
For each room, we associate with it the maximum number of possible occupants.
A room can be reserved by hotel guests between a given check in and check out date.
Each guest has a guest ID and a name that is not necessarily unique.
The guest who pays for the room is designated as the payer. This person has an attribute, credit card number, associated with himher for the credit card that is used to pay for the stay.
Suppose we have an entity set room related to an entity set guest through a relationship reservedBy. If we wish to record the duration of the guests' stay, ie record checkInDate checkOutDate what is the best way to model this?
point
Add a relationship stay with attributes checkInDate and checkOutDate connecting room and guest.
Add attributes checkInDate and checkOutDate to the relationship reservedBy.
Add attributes checkInDate and checkOutDate to room.
Add attributes checkInDate and checkOutDate to guest.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
