i am trying to develop product details page for eCommerce site, say we list some products in a view , now when users clicks in a product he is taken product details view to show product specifications, with add to cart, reviews etc , but here product specification changes dynamically for every product , example:
Clothing Product:
Size
: 40
Mobile Product:
Operating System
: Android
now i dont want the specification name operating system in a clothing product and vice versa.
so i researched about this and found this and this post's . But some folk's comment saying Entity Attribute Value is not good practice
,
so can anyone help me choose best and easy design pattern to list product details with changing specifications in asp mvc, i am new to this.
Any help would be great.
EAV has several downsides:
- The database layer can't force attribute names to be correct, so you have to do it in code
- Search performance is slow if you're filtering on values in the EAV table
- Performance is also slow if you try to join other tables based on the values in the EAV table
But if you need a flexible and dynamic set of attributes and you don't need to search or join by the attribute values, EAV is a good solution.
来源:https://stackoverflow.com/questions/31827767/asp-mvc-list-ecommerce-product-with-dynamically-changing-specifications