Reputation: 5628
I'm working on a classified ads site with 12 categories. E.g. category vehicles
has items cars
, bikes
, Commercial Vehicles
and spare parts
. The following is a flow diagram for posting an ad:
I need to show the specification in the Form Filled
section of the above image to the users in dropdown lists in the form when they are posting an advertisement. The car
specification will be its color
,engine
,fuel type
.
The ERD is below :
How should this issue be tackled, what are the best practices and is the current design going along the right lines?
Upvotes: 3
Views: 4369
Reputation: 16673
i agree look at EAV models...
for some other tables, you have many normalization issues - for example:
Upvotes: 0
Reputation: 11823
So, you are trying to be able to have different specifications for different items in your categories? Or, in other words, it is like having different attributes for different types of products in an e-commerce website.
If that the problem you are tackling, then you should look into the Entity–Attribute–Value (EAV) model that is how the problem is solved. By the way, one of the most popular open source e-commerce engines uses it as well.
Upvotes: 1
Reputation: 7284
Hope this helps:
In a simplified case, you will need some extra tables.
Upvotes: 1
Reputation: 26464
On the whole this looks ok. Here are some observations:
Upvotes: 2