Beginner to eav model,I am having an entity table,attribute table and value table.
Entity Table
|entity_id|entity_name|
Attribute table
|attribute_id|attribute_name|
value table:
|entity_id|attribute_id|value|
For same entity_id and attribute_id I have multiple values.
e.g
entity_id | attribute_id | value |
---|---|---|
1 | 1 | 1.2 |
1 | 1 | 1.3 |
this causes duplicates in eav table.how to populate the data
EAV
- it's an anti-pattern! Check out this, and this. There is only one major commercial system that uses it (Magento) and that's for a very particular use case - fashion (and, even then, I think they shouldn't have used EAV - personal opinion). As a basic first principle of db design - every entity should be a table of its own!