I have an entity that has so many properties and the customer wants to add more later and may delete some too
he may add or delete whenever he want
So I did this

but now when I need to add or delete I need to change 3 tables and add constraints
- I know it’s not a good solution but don’t know what to do else
How would you solve this?
-
note:
-
attribute are more than 40 and may be ether numeric or strings
-
I may not delete attributes so often
Edit: something I forgot to mention about attributeValues is I need to select on of the old values that already inserted or add new
Yep. That’s one of the pitfalls of Entity Attribute Value designs. Actually; that’s one of the smaller pitfalls; wait until you have to write some reports or run a complex query.
But, if that’s what the customer wants…
Generally, EAV designs are only appropriate when the number of possible attribute values is large, but the number of actual values is small. The canonical example is medical patient records, where the number of possible symptoms that a patient might have is very large, but the number of actual symptoms is probably comparatively small.
Note that the leftmost table in your design is wrong; instead of fields like
attribute1,attribute2, there should be a linking table in between your leftmost and center tables, creating a many-to-many relationship.