79170825

Date: 2024-11-08 16:23:31
Score: 0.5
Natty:
Report link

If EAV would be the superior solution to everything (regarding database design) then why is there no database vendor that offers me just that engine with only three build in tables called Entity, Attribute and Value and we can skip all that cumbersome DDL like CREATE TABLE etc. It certainly would be much cheaper as there is far less to implement. Still Oracle and Microsoft SQL Server leave us out here in the cold or simply wont give up their old bad ways. Maybe they just dont like making money!!! The appealing fact that it is so flexible to so many developers comes at a heavy price. Typelessnes (or hard to implement), constraintless (or hard to implement except when you are a developer with 'RED' years of experience or are age minus 30, all entries that could have been avoided with constraints). EAVs perform horribly when the number of attributes exceeds a small amount as Hospitals and Magento found out.

For OP add these columns to the tables that need them or ask your self why you need them. If for auditing purposes this isnt very secure. Try to stick to more simple designs and proven designs.

For everyone involved in databses i really would recommend Bill Karwin's book. I bought it initially as "might be interesting, why not" but it turned out to be a must have.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Martien