You are on page 1of 2

Lab 1

Operational Database
Context
A car rental company has rent stations in different cities in Vietnam and abroad. The company
rents car(s) to customers for a certain duration. To rent a car, a customer must fill out a form
mentioning their detail information. There are two kinds of customers: individual customers
and organizations. For individual customers, we record their FirstName, LastName, Phone,
Email, Gender, Address (street address, district, city, country (for example 22 Tran Phu, Hai
Ba Trung, Ha Noi, Vietnam)). For organizations, we record the name, address (street address,
district, city, country), phone, contact’s name, contact’s email. Every customer must have a
unique identity number.
The customers can rent cars of certain types from a location. Each car type has a name (e.g.
hatchback, sedan or SUV) and a seating capacity. For example, SUV 5 seats and SUV 7 seats
are considered as two different types. Each car has a unique identity number, a plate number, a
type, a manufacturer, a model, color, year of make. Every car of the same type, manufacturer,
model, and year of make must have the same rental price per day and the same deposit amount.
For example, every Honda HR-V (SUV 5 seats type, Honda manufacturer, HR-V model) made
in 2020 must have the same rental price per day and the same deposit amount in all rent stations.
Many cars are available in one station.
Each station has a unique identity number, a name, an address (street address, district, city,
country). The company allows customers to pick up their car from one station and return the
car to another station. For a particular booking, the customer could book many cars. When
making a booking, the customer must specify the expected pickup datetime, the expected return
datetime, the pickup station and the return station as well as the number of cars of each sub-
model that he/she wants to rent. For example, an organization makes a booking including 3
Honda HR-V made in 2020 (SUV 5 seats, Honda, HR-V model, 2020) and 2 Toyota Hindlander
2019 (SUV 7 seats, Toyota, Hindlander model, 2019).
The customer will choose the car when he/she picks up the car. For simplifying, all cars in a
booking must be picked up from the same station on the same day and must be returned to the
same station on the same day. Each booking has a status (booked, confirmed, deposited, paid,
and cancelled) and a booking time. The system records the details of each rented car in a
booking (the car, the real pickup datetime, the real return datetime).
The rental price of a car is given per day, it means that if for example, a customer rents a car at
14:30 November 27, 2012 and brings it back before 14:30 November 28, 2012, he must pay the
amount of the rental for a day. If he brings it back at 15:30 November 28, 2012 for example, he
must pay the amount for 2 days. Note that the price per day is used for a limited kilometers per
day, for example if the customer drives more than 250kms per day, he/she must pay an extra
price of 11000 vnd for each extra kilometer. The extra price is dependent on the sub-model of
the car (car type, manufacturer, model and year of make).
The customer must pay a total deposit amount for each car he/she picks up and pays for his
rental when he/she brings back the cars. Note that the unit price of the car could be changed by
time, but the price that the customer must pay when he/she returns the car is the price on the
pickup date.
Question : give the entity relationship diagram of the operational database of the system.

You might also like