I'm having problems with your terminology. You describe the EAV structure (for the Entity-Attribute-Value attribute).
In addition: a column-oriented database usually refers to a database in which each column is stored separately from the others (when I learned about databases, it was called βvertical partitioning,β but I donβt think it happened). Examples include Paracel and Vertica.
The database of attribute entities stores each attribute for an object as a separate row.
The first problem you have with your particular structure is typing. Some attributes are strings, and some are numbers. This becomes a management nightmare in the EAV world. Either you store everything as strings (losing the ability to enter control values ββand guaranteeing arithmetic words), or add several columns for different types with a type column (making queries much more complicated).
Similarly, restrictions and references to foreign keys are much more difficult to implement. In addition, since you repeat the object identifier and attribute identifier on each row, data often takes up more space. NULL values ββare usually quite space efficient.
On the OLTP side, another problem arises. When you want to insert an object, you usually want to insert a bunch of attributes. One insertion has now turned into many inserts, and you will want to start wrapping them in transactions, affecting performance.
Given all these drawbacks, you might think that you should never use EAV models. There is a place for them. They are especially useful when attributes change over time. Say, if you have an application in which users can put their own information using tags. In such cases, the best solution is a hybrid approach. Use a regular relational table with many columns for general information. Use the EAV table for more information for each object.
source share