background preloader

Entity Attribute Value EAV

Facebook Twitter

MUCK – Massively Unified Code-Key, Generic Three Table Data Model. Another Database Design Mistake To Avoid.

MUCK – Massively Unified Code-Key, Generic Three Table Data Model

Actually, one of the worst DB design mistakes you can make. One of the worst things you can do to a database system is to make a generic data model of three tables for the whole system. A variation is to use three tables to combine multiple lookup tables into one. Instead of standard tables and columns, three tables are used for everything. One table each for: entity/table attribute/column/field values of the data. Entity–attribute–value model. Entity–attribute–value model (EAV) is a data model to describe entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest.

Entity–attribute–value model

In mathematics, this model is known as a sparse matrix. EAV is also known as object–attribute–value model, vertical database model and open schema. There are certain cases where an EAV schematic is an optimal approach to data modelling for a problem domain. EAV - Entity-Attribute-Value Implentation.