Answer the question
In order to leave comments, you need to log in
Should attribute values be stored as separate columns in EAV?
The task of storing entities with an arbitrary number of attributes arose. At the same time, the number of attribute types is limited: 7. If you use EAV, is it worth making a separate column for each type?
+----+-----------+------------+----------+-----------+--------------+------------+
| id | entity_id | name | type | value_int | value_string | value_date |
+----+-----------+------------+----------+-----------+--------------+------------+
| 1 | 1 | size | int | 10 | null | null |
+----+-----------+------------+----------+-----------+--------------+------------+
| 2 | 1 | title | string | null | product | null |
+----+-----------+------------+----------+-----------+--------------+------------+
| 3 | 1 | created_at | datetime | null | null | 2019.10.04 |
+----+-----------+------------+----------+-----------+--------------+------------+
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question