project 2 description in this project you will design and implement a
Search for question
Question
Project #2 Description
In this project, you will design and implement a database for keeping track
of information about a car rental company. You will first design an EER
schema diagram for this database application. Then, you will map the EER
schema into a relational database schema and implement it on
ORACLE/MYSQL in Omega. Finally, you will load some data into your
database, and create some queries and update transactions.
Assume that the following requirements were collected for this application:
1. The database keeps track of CUSTOMERS. Each CUSTOMER has a unique
IdNo (assume this is a unique integer generated by the system for each
new CUSTOMER, such as 1, 2, 3, ...), a Name (assume this is string
consisting of an single initial and last name only for simplicity, such as
"J.Smith" or "R.Wong”), and a Phone (a string of 12 characters such as
"817-272-3000"). Some of these customers are business customers who
while others are individuals rent for personal use. And most of the
business customers use rental on weekly basis.
2. The database keeps track of CARS available for rental, which are
categorized based on their type. There are six main types: COMPACT,
MEDIUM, LARGE, SUV (Sports Utility Vehice), TRUCK, and VAN. Cars for
each type can be classified into luxury and regular categories. Each type
of car has its own Daily Rate and WeeklyRate (assume all cars of the same
type have the same rental rates). Luxury vehicle rates are 20% more
than the regular car types. For simplicity, we will assume that there is
only one rental location.
3. Each CAR has a VehicleID (a unique number for each car assume it is a
number 1001, 1002, 1003, ...), Model (Chevy, Toyota, Ford, ...), and Year
(2015, 2014, ...).
4. Each car is either owned by the rental company, a bank or an individual
owner who leased the vehicle to the company on a long term basis.
Choose suitable attributes for these different type of owners to identify
the right owner of a vehicle.
5. The database will keep track of the current (active) RENTALS as well as
scheduled RENTALS of each CAR. The are two types of RENTAL: DAILY and
WEEKLY. For each DAILY RENTAL, the information kept will include the
specific CAR and CUSTOMER as well as the NoOfDays, StartDate, and
Return Date (the Return Date can be calculated from the StartDate and
NoOfDays). For each WEEKLY RENTAL, the information kept will include the
specific CAR and CUSTOMER as well as the NoOfWeeks, StartDate, and
Return Date (the ReturnDate can be calculated from the StartDate and
NoOfWeeks). Each rental will also have the AmountDue for the rental,
which is a derived value that can be calculated from the other
information.
6. The database will also keep track of which CARS are available for rental
during which periods. You will first design an EER schema diagram based upon the RENTALS
database requirements specified above, and create an EER schema diagram
and documentation report describing your design choices. As part of this
assignment, you should identify any missing or incomplete requirements,
and explicitly state them in your documentation. You should also explicitly
state any assumptions you made that were not part of the requirements
listed above.
The second part of the assignment will be to map the EER schema design to
a relational database schema, and create the tables corresponding to the
relational schema using the ORACLE DBMS (or MySQL). You will add to your
report a listing of the CREATE TABLE statements. Specify as many
constraints (key, referential integrity) as you can in the relational schema.
You should state the choices you made during the EER-to-relational
mapping, and the reasons for your choices.
The third part of the project is to load some data into the database, and
apply certain update transactions and retrieval queries. You will create your
own data. Include at least 10 customers, and at least 40 cars of different
types.
The following are the tasks for the third part of the project:
1. Load some initial data (as discussed above) into the database tables that
you created in Part 2 of the assignment. You can either write a loading
program, or use SQL/PLUS (insert command), or use SQL/FORMS. Your
data should be kept in files so that it can easily be reloaded during
debugging. The data format should be designed by you. (Note: You can
also use the transactions created by you in item 3 below to load some of
the data).
2. Write queries to retrieve and print all the data you entered. Try to print
the data so that it is easy to understand (for example, print appropriate
headings, such as: Customers, Compact Cars, SUVs, Current Rentals,
etc.).
3. Write a query that will prepare a report for weekly earnings by owner, by
car type and per car unit that owner owns within that car type.
4. Write the following database update transactions using any suitable
programming or scripting language (e.g. JAVA/JDBC, Python or PHP).
4.1
4.2
4.3
The first transaction is to add information about a new
CUSTOMER.
CAR.
The second transaction is to add all the information about a new
The third transaction is to add all the information about a new
RENTAL reservation (this must find a free car of the appropriate type for
the rental period). 4.4
4.5
The fourth transaction is to handle the return of a rented car.
This transaction should print the total customer payment due for the
rental, and enter it in the database.
The fifth transaction is to enter or update the rental rates (daily
and weekly) for a type of car.
5. Each transaction should have a user friendly interface to enter the
information needed by the transaction. This can either be a Web-based
interface, a command line interface, or a forms interface.
6. Test your transactions by adding a few new customers, cars,
reservations, by changing some rental rates and reservations rates.
Deliverables
1. Parts 1 and 2: This should include
for Part 1 the EER diagrams for your designs as well as documentation
describing any assumptions you made, and the reasons for your
design choices. Draw the EER diagrams using the notation in the
textbook. You can also use UML class diagrams notation. You can use
any drawing tool for drawing your diagrams. For part 2, what you turn
in should include your relational schema diagram design and your
CREATE table statements, and documentation describing your EER-to-
relational mapping choices.
2. Part 3:. This will include a demo
demonstrating that your implementation works, as well as
demonstrating your transactions to the grader. Source code of all your
transactions should be submitted, as well as the data files. A demo
schedule will be determined before the due date.