Homework 6
Hotel Management
This homework is worth 50 points.
Goals: When you finish this homework you should be able to:
- Construct ER designs and the associated diagrams.
- Design a database based upon an ER design.
- Implement your design as a MySQL database
- Provide a C level interface to query and modify your database.
Assignment
For this assignment you will design and implement a database for a small hotel chain.
The chain consists of a number of hotels, each has a unique name and a city.
The hotels have a number of rooms. Each room has a number (unique to each hotel) a type (Double, Single, ...) and a price.
In addition, the system should keep track of guests. Each guest has a name, a unique guest id and a city.
For your system, you should be able to support queries such as
- Produce a list of all guests staying at a given hotel on a given night.
- For a given guest, produce a list of all of the hotels and rooms they have booked.
Design and implement this database in MySQL. Provide c/c++ programs which will
perform each of the listed queries as well as:
- Add a guest to the system.
Your programs should report any errors that they encounter and should not allow insertion of invalid data..
Report
You must provide the following documentation in the form of a written report:
- A formal description of the final database, include an overview of the data and the final product.
- The list of data dependencies
- The list of assumptions.
- The list of questions.
- An ER-Diagram of your design.
- The database schema.
- Documentation on how you handled the Genre problem.
The following should be placed in an appendix of your report:
- The scripts to create the databases. (These should be documented with comments
- Examples of each table (First 5 lines)
Please submit a tar file containing your c/c++ code associated with this assignment to danbennett360@gmail.com by the due date.
I have access to your MySQL database, so I will examine your final set of tables when I grade this project.
Submission
Your answers must be typed. Print out the report and turn it in by class time on the due date. Keep the tables associated with this database on the MySQL server for the class until you receive feedback for this assignment.