Data Abstractions


This document has three major sections:

The ERD diagram


The ERD entity and relationship attributes:

Entities

EmployeeGuestInvoiceFee
employee IDguest IDinvoice numberitem number
employee first nameguest first namedatefee description
employee last nameguest last nametimefee cost
security typeaddresspayment method
passwordcitytotal bill
province/statefood order
countrymovie order
credit card #telephone bill
credit card exp.misc. charges
credit card namehotel tax
type of photo IDGST
discount name
discount rate
phone number
Room TypeCredit CardSecurityRoom
room type namecredit card typesecurity typeroom number
room ratecredit card namesecurity nameroom type id
room type id

Weak Entity

Room Service
time ordered
date ordered
time to deliver
date to deliver
room number
employee ID
comments
item number

Relationships

In RoomBooked bySign-in bySign-out by
guest IDguest IDguest IDguest ID
room numberemployee IDemployee IDemployee ID
confirmation no.room numberroom numberroom number
arrival date
duration of stay
check out date
no. of occupants
Security forCredit Card ofRoom type ofCharged to
employee IDguest IDroom numberguest ID
security typecredit card type"room typeinvoice number
Billed forIssued byFee ofDelivered by
invoice numberinvoice numberitem numberemployee ID
room numberemployee IDroom numberroom number
date ordereddate ordered
time orderedtime ordered


The Data Dictionary for the ERD:

The data dictionary is vague for room, room type, and security type. Please clarify these definitions and possibly the purpose for these attributes in the DD.

address = string
* A non key attribute of entity Guest, having a maximum length of 256
* characters. This attribute is not needed when making a reservation
* to stay at the hotel.

arrival date = date
* A non key attribute of the relationship In Room. The room booked
* in date.

Billed for = @invoice number + @room number
* This is a 1:Mc relationship that relates an instance of entity
* Invoice to an instance of entity Room. This indicates which room
* an invoice is for.

Booked by = @guest ID + @employee ID + @room number
* This is a 1:Mc:Mc relationship. It relates an instance of entity
* Guest to an instance of entity Employee and entity Room. It
* indicates which employee booked the room for the guest.

Charged to = @guest ID + @invoice number
* This is a 1:M relationship that relates an instance of entity
* Invoice to an instance of entity Guest. This relationship indicates
* who an invoice should be charged to.

check out date = date
* A non key attribute of the relationship In Room. The date the
* occupant of the room will be checking out.

city = string
* A non key attribute of entity Guest. Maximum length is 256
* characters. Allowed to be null when booking.

comment = string
* A non key attribute of weak entity Room Service. Can be up to 100
* characters long. It is used to provide an special requests or remark.

confirmation number = integer
* Identifies a unique reservation. It is a non key attribute of the
* relationship In Room.

country = string
* A non key attribute of entity Guest. Maximum 50 characters long.
* Allowed to be null when booking.

Please clarify credit type as compared to credit card name.

Credit card = @credit card type + @credit card name
* A entity which contains a credit card name and a unique integer
* identifying the credit type name.

Credit Card of = @guest ID + @credit card type
* This is a 1:Mc relationship relates an instance of Guest to an
* instance of Credit Card. It indicates the type of credit card.

credit card expiry = date
* A non key attribute of entity Guest. This is the expiry date of
* the credit card.

credit card name = name
* A non key attribute of entity Guest. This is the name that is
* on the physical credit card.

credit card number = string
* A non key attribute of entity Guest. Maximum length is 256
* characters.

credit card type = integer
* A key attribute of entity Credit Card. It uniquely identifies each
* credit card type.

date = string
* A typed defined as a string of 10 characters, holding a date.
* it is of the format YYYY/MM/DD

date ordered = date
* A key attribute of the weak entity Room Service. It gives the
* date of when the particular room service was requested

date to deliver = date
* A non key attribute of the weak entity Room Service. Informing
* the hotel, as to when the particular requested room service is
* to be provided/delivered

Delivered by = @employee ID + @room number + @date ordered + @time ordered
* This is a 1:Mc relationship that relates an instance of the weak
* entity Room Service to an instance of entity Employee. It indicates
* which employee delivered the room service.

discount name = string
* A non key attribute of entity Guest. Maximum 256 characters
* long. Allows the user to enter the reason for giving discount

discount rate = flate
* A non key attribute of entity Guest. Has 2 decimal places

duration of stay = integer
* A non key attribute of the relationship In Room. It is 3 digits
* long, holding the number of days the guest will stay for. Its
* from 1 to 999 days.

Employee = @employee ID + employee first name + employee last name + security type + password
* This entity contains information of all employees working for the
* hotel.

employee first name = name
* A non key attribute of entity Employee, which contain employee's
* first name

employee id = integer
* A key attribute of entity employee. It uniquely identifies each
* instance of entity employee.

employee last name = name
* A non key attribute of entity Employee, which contain employee's
* last name.

Fee = @item number + fee description + fee cost
* This entity stores the different room services offered (ie. food
* item, wake up calls). It contains a description and cost for
* each item.

Fee of = @item number + @room number + @date ordered + @time ordered
* This is a 1:Mc relationship that relates an instance of the weak
* entity Room Service to an instance of entity Fee. It indicates
* which service was ordered and what it will cost.

fee description = string
* This item describes the type of fee. it is a string 50 characters
* long.

fee cost = real
* This item gives the cost for a fee. It has a range of 0.00 to no
* upper bound.

food order = float
* A non key attribute of Invoice. Carries up to 2 decimal places.
* This is the total sum for the food ordered.

Guest = @guest ID + guest first name + guest last name + address + city + province/state + postal code/zip code + photo ID + discount name + discount percentage + phone number
* Is an entity that stores all the information pertaining to a guest
* staying at the hotel. Most of the information is obtained when a
* guest checks into the hotel.

guest ID = integer
* A key attribute of the entity Guest. It is 6 digits long, and has
* a fixed format.

guest first name = name
* A non key attribute of entity Guest, gives first name of a person
* staying at the hotel.

guest last name = name
* A non key attribute of entity Guest, gives last name of a person
* staying at the hotel.

GST = float
* A non key attribute of entity Invoice. Carries up to 2 decimal
* places. GST charged.

hotel tax = float
* A non key attribute of Entity Invoice. Carries up to 2 decimal
* places. Stores the tax (percentage) for hotel usage.

Length of stay must be recorded on the invoice.

Invoice = @invoice number + room number + employee ID + date + time + payment method + total bill + food orders + movie ordering + telephone vill + miscellaneous charge + hotel tax + GST + guest ID
* This entity holds the information contained on an invoice, which
* is issued when the guest checks out.

invoice number = integer
* An key attribute of entity Invoice. It uniquely identifies each
* instance of entity Invoice. Its a 6 digit number that ranges from
* 1 to the number of instances of entity Invoice.

In Room = @guest ID + @room number + confirmation number + arrival date + duration of stay + check out dat + number of occupants
* This is a relationship between entities Guest and Room

Issued by = @invoice number + @employee ID
* This is a 1:Mc relation that relates an instance of entity Invoice
* to an instance of entity Employee. This relationship indicates
* which employee generated an invoice.

Item number = integer
* A key attribute of entity Fee. It identifies each fee with a
* unique id. Its bounded by the number of instances of Fee. It is
* represented by a 5 digit number.

miscelaneous charge = float
* A non key attribute of entity Invoice. Carries up to 2 decimal
* places. The sum of cost for anything damaged or any thing charged
* to the guest that is not on the fee list.

movie ordered = float
* A non key attribute of entity Invoice. Carries up to 2 decimal
* places. The sum for the movie ordered.

name = string
* A type, defined to have a maximum length of 256 characters,
* contains no space, only alphabetical characters allowed with
* exception of apostrophe.

number of occupants = integer
* A non key attribute of relationship In Room. It is 1 digit long,
* representing the number of occupants in a room. Bounded between
* the values of 1 and 9

password = string
* A non key attribute of entity Employee, which must be at least 8
* characters in length and maximum 11 characters. Every employee,
* has a password, and to access the system, it is required that
* they enter one

payment method = string
* A non key attribute of entity Invoice. Denotes the method of
* payment

phone number = string
* This is a non-key attribute of entity Guest. It contains the contact
* phone number for the guest. Its of the form XXX-XXX-XXXX. The first
* three X's being the area code.

province/state = string
* A non key attribute of entity Guest. Maximum length is 256
* characters. Allowed to be null when booking. Length given is
* to accomodate full name rather than abbreviations.

postal code/zip code = string
* A non key attribute of entity Guest. Maximum length is 256
* characters. Allowed to be null when booking

Room = @room number + room type
* This entity represents a room in the hotel. It contains a room
* number and the room type.

room number = integer
* This key attribute of entity Room contains the room number.
* Its a 3 digit number ranging from 1 to 999.

room rate = real
* This non-key attribute of entity Room Type indicates the cost of
* the room type for one night. Its ranges from a value of 0.0 to
* 1000.0.

Room Service = @room number + @date ordered + @time ordered +
comment + date to deliver + employee ID + item number + time to deliver * A weak entity containing all the services requested by a room,
* ie. wake up calls, food orders...

Room Type = @room type id + room name + room rate
* This entity contains the room type name and cost for each room type.

room type id = integer
* This key attribute of entity Room Type uniquely identifies each
* instance of entity Room Type. Its a 2 digit number from 1 to 99.

room type name = string
* This non-key attribute of entity Room Type gives the name for
* each room type. Its a string of 50 characters in lenght.

Room Type of = @room number + @room type
* This is a 1:Mc relationship that relates an instance of Room
* to an instance of Room Type. This relationship gives the room
* type for each room.

Security = @security type + security name
* This entity contains a table of all possible access that an
* employee can have and a name, descriptive of the employee's
* job classification.

Security for = @employee ID + @security
* This is a relationship that relates an instance of Employee to an
* instance of Security. The relationship is 1:Mc. It indicates the
* security level for each employee.

security name = string
* A non key attribute of entity Security. It can be up to 25
* characters long, that is descriptive of employee's job
* classification.

security type = integer
* A key attribute of the entity Security. The value of security type
* is bounded byt he number of items in the table, maximum value will
* be 100.

Sign-in by = @guest ID + @employee ID + @room number
* This is a 1:Mc:Mc relationship, that relates an instance of entity
* Guest to an instance of entity Employee and entity Room. It
* indicates which employee signed a guest into a room.

Sign-out by = @guest ID + @employee ID + @room number
* This is a 1:Mc:Mc relationship, that relates an instance of entity
* Guest to an instance of entity Employee and entity Room. It
* indicates which employee signed a guest out of a room.

telephone bill = float
* A non key attribute of entity Invoice. Carries up to 2 decimal
* places. This charge is not calculated by the system, but rather is
* provided by an outside source.

time ordered = time
* A key attribute of weak entity Room Service. Holds the time at
* which a particular room service was requested.

time to deliver = time
* A non key attribute of weak entity Room Service. Informing the hotel as
* to what time the particular room service is to be provided/delivered

time = string
* A type defined as a string of 8 characters, holding a time. It is
* of the format HH:MM:SS.

total bill = float
* A non key attribute of entity Invoice. Carries up to 2 decimal
* places. This is the final and total sum amount for which the
* departing guest must pay.

type of photo ID = string
* A non key attribute of entity Guest. Maximum 256 characters in
* length. Consisting of a description of the kind of ID and could
* include number that identifies the card as well. It is obtained
* when guest checks in to hotel.

The wake-up call function does not seem to be explained in any detail anywhere within the data abstractions. Please provide information about this function.