Question: Question 5 You are asked to design the database structure for an international hotel chain. The following is a list of requirements for the design
Question
You 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.
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.
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.
For each room, we associate with it the maximum number of possible occupants.
A room can be occupied by hotel guests between a given checkin and checkout date.
Each guest has a guest ID gID 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, creditCardNumber, associated with himher for the credit card that is used to pay for the stay.
Guests are modeled using an entity set guest. They are related to room via a relationship reservedBy. What is a good way to model payer? What isare the attributes for payer? What isare its keys
point
As an entity set payer connected to guest using a manytoone relationship paidby Add creditCardNumber as an attribute to payer. Attributes: creditCardNumber. Key: creditCardNumber.
As a role payer of guest. Add creditCardNumber as an attribute to guest. Attributes: gID, name, creditCardNumber. Key: gID, creditCardNumber.
As a role payer of guest. Add creditCardNumber as an attribute to guest. Attributes: gID, name, creditCardNumber. Key: gID.
As a subclass of guest with creditCardNumber as an attribute. Attributes: gID, name, creditCardNumber. Key: gID, creditCardNumber.
As a subclass of guest with creditCardNumber as an attribute. Attributes: gID, name, creditCardNumber. Key: gID.
As an entity set payer connected to guest using a onetomany relationship paidby Add creditCardNumber as an attribute to payer. Attributes: creditCardNumber. Key: creditCardNumber.
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
