In order to explain the basics of the ER model, an online web portal to buy and sell cars will be modeled. The requirements of this sample application are as follows, and an ER model will be developed step by step:
The portal provides the facility to register users online and provides different services for users based on their categories.
Users might be sellers or normal users. The sellers can create new car advertisements; other users can explore and search for cars.
All users should provide their full name and a valid email address during registration. The email address will be used for logging in.
The seller should also provide an address.
The user can rate the advertisement and the seller's service quality.
All users' search history should be maintained for later use.
The sellers have ranks and this affects the advertisement search; the rank is determined by the number of posted advertisements and the user's rank.
The car advertisement has a date and the car can have many attributes such as color, number of doors, number of previous owners, registration number, pictures, and so on.