2

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.

Community
  • 1
  • 1
Shaiju T
  • 6,201
  • 20
  • 104
  • 196

1 Answers1

1

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.

Josh Yeager
  • 3,763
  • 1
  • 25
  • 29
  • I know this is very late comment, I have already used EAV model, is there any best alternative which can be searched for, what kind of model does amazon etc use to search products by specifications ? – Shaiju T Oct 18 '16 at 12:00
  • Also I can see some product details page which has product features with images , with stylish typography design and buttons for single product, I thing we can use wysiwyg html editor and save in SQL as `nvarchar(max)`, and decode the html later, Am i correct ? – Shaiju T Oct 18 '16 at 12:03