
This example has the next 4 entities:
- Car Rental Company: company itself, which is the “whole“.
- Car: cars owned by the company.
- Rental: rental entity (like contract), which is the “whole” for Car and Renter entities.
- Renter: a person who rent car.
All of the connections are composition. The system has the next generalization connections:
- Car Rental Company – Car: the company can have 0 or many cars; a car can have only 1 company.
- Car Rental Company – Rental: the company can have 0 or many rentals; a renal can have only 1 company.
- Car Rental Company – Renter: the company can have 0 or many renters; a renter assigned only o 1 company.
- Rental – Car: 1 rental can be assigned to 1 car and vise versa.
- Rental – Renter: each rental can have only 1 renter but a renter can have 0 or many rental.