Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hotel: Class for managing the branch hotel, and contact of each hotel
- a. hotelID: is a code name for branch hotel
- b. hotelName: branch hotel name
- c. hoteManagerID: shows the Staff ID of manager of the branch hotel
- d. hotelAddress: information of the branch hotel
- e. hotelPhone: the contact number of each hotel
- Employee: Class to manage the information of the employee in each branch hotel.
- a. employeeID: code for each staff
- b. hotelID: identify which branch hotel the employee worked for
- c. employeeName: Employee 's name
- d. employeePosition: the work of employee (Receptionist, accountant, manager, cleaner,…)
- e. employeeSalary: the monthly salary of the employee
- f. employeePhone: the contact number
- g. employeeAddress: the home address of employee
- Customer: Class to manage the information of the customer in each hotel. In order to provide privacy for the customer, we only collect necessary identification information.
- a. customerID: an ID that was given to customer when booking and check in (may use identification number)
- b. customerName: Customer's name
- c. customerPhone: the contact number
- d. customerAddress: the home address of customer (in case of return missing luggage, etc)
- Room: The table of rooms available in hotels
- a. roomID: The room code (including the hotel indication, floor and room number, for example: E308 is the 8th room on 3rd floor of Hotel E)
- b. hotelID: the branch hotel that have the room
- c. roomType: the type of the room
- d. roomPrice: price per day
- e. state: reserved (1) or empty (0), the room state will be changed automatically when there is a check in or check out.
- Booking: This table manage the booking record and the current customer in the hotel also
- a. bookingID: The booking code auto increase from 1
- b. customerID: ID of the customer made the booking
- c. roomID: ID of the booked room
- d. hotelID: ID of the hotel
- e. bookingDate: the date the booking is made
- f. checkInTime: The time the customer check in, get updated by receptionist
- g. checkOutTime: The time the customer check out, get updated by receptionist
- ServiceType: The table of types of service and price so that we can easily add new service or change the price.
- a. serviceType: Laundry, Served Food and Drink, etc
- b. servicePrice: the price of service
- Service: The table stores the records of all the services with amount detail and Customer ID for later payment
- a. serviceID: The service code auto increase from 1
- b. customerID: ID of the customer requests the service
- c. time: Time of service
- d. serviceType: Type of service
- e. quantity: quantity of service(multiply with price of Service Type)
- f. serviceFee: calculated automatically
- g. state: Paid (1) or Unpaid (0)
- Payment: The payment bill of customer, which is paid by the Check out time
- a. billNumber:
- b. customerID: we can extract the customer data from id
- c. roomFee: calculated by the Check out time
- d. totalServiceFee: calculated from service during the time customer in the hotel
- e. totalPayment: Total sum of Room Fee and Service Fee
- III/ Implementation:
- CREATE TABLE Hotel (
- hotelID nchar(10) PRIMARY KEY,
- hotalName nchar(20),
- hotelManagerID nchar(10),
- hotelAddress nchar(20),
- hotelPhone nchar(20));
- CREATE TABLE Customer (
- customerID nchar(10) PRIMARY KEY,
- customerName nchar(20) not null,
- customerPhone nchar(20),
- customerAddress nchar(20));
- CREATE TABLE Employee (
- employeeID nchar(10) PRIMARY KEY,
- hotelID nchar(10) not null,
- employeeName nchar(20) not null,
- employeePosition nchar(15),
- employeeSalary real,
- employeePhone nchar(20),
- employeeAddress nchar(20),
- FOREIGN KEY (hotelID) REFERENCES Hotel);
- CREATE TABLE Room (
- roomID nchar(10) PRIMARY KEY,
- hotelID nchar(10) not null,
- state binary,
- roomType nchar(20),
- roomPrice real,
- FOREIGN KEY (hotelID) REFERENCES Hotel );
- CREATE TABLE Booking (
- bookingID nchar(10) PRIMARY KEY AUTO_INCREMENT,
- customerID nchar(10) not null,
- roomID nchar(10) not null,
- hotelID nchar(10) not null,
- bookingDate datetime,
- checkInTime datetime,
- checkOutTime datetime,
- FOREIGN KEY (customerID) REFERENCES Customer
- FOREIGN KEY (roomID) REFERENCES Room,
- FOREIGN KEY (hotelID) REFERENCES Hotel);
- CREATE TABLE ServiceType (
- serviceType nchar(20) PRIMARY KEY,
- servicePrice real);
- CREATE TABLE Service (
- serviceID nchar(10) PRIMARY KEY AUTOINCREMENT,
- customerID nchar(10),
- time datetime,
- serviceType nchar(20),
- amount int;
- serviceFee real,
- state binary,
- FOREIGN KEY (roomType) REFERENCES Room,
- FOREIGN KEY (hotelID) REFERENCES Hotel);
- CREATE TABLE Payment (
- billNumber nchar(10) PRIMARY KEY AUTOINCREMENT,
- customerID nchar(10),
- roomFee real,
- totalServiceFee real,
- totalPayment real,
- FOREIGN KEY (customerID) REFERENCES Payment);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement