Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started