DEV Community

Discussion on: How to organize dynamic attributes/properties of products specification?

aarone4 profile image
Aaron Reese • Edited on

Hi Muhammed , welcome to the community. You are facing the classic entity-attribut-value problem and there is no one good answer. Any solution will involve compromise, especially in a relational model.
How will you handle changes in category attributes and their valid range of values. E.g. smartphones get hologram projection an up to 7 cameras. Now old phones don't have the old attribute. How are you going to search across categories for products that have similar attribute values but may be in different categories. Eg compact, DSLR and video cameras
EAV is often 'solved' using documents, either JSON or XML and implenting search technology for the index. Good luck in solving this .It is one of the trickiest problems to fix at scale

mssadewa profile image
Muhammad Sadam Sadewa Author

Hi Aaron,
Thanks for the respon.
That what I though when specification/attribute evolve, user need to update the attribute and I'm still don't know what will happen when active asset and model exist and user update attribute of category.
I've read about EAV and implement it on but I'm forgot to update the table relation diagram.
Thank you