Bicycle rental database
This database can be implemented around the entity Bicycle
and its properties. Usually, there should be detailed info about the bicycle as well as a table for the rental properties.
A user should be able to rent the bike from a certain location, and maybe return it to a different location in the city. The user should pay for the time spent with the rented bike, at the end of the rental.
Given this, the data in this database should be the following:
- Bike details: year, model, tires, gears, etc
- User details: name, surname, ID number, phone number...
- Rental details: date, price, location from, location to ...
Query examples:
Get the bikes from the brand XYZ that have been rented in the past 3 days.
Get all the bikes that have been rented from location X and returned to location Y.
The data should be structured like in the following example ER diagram:
