In the database you need to store objects that have a variable number of attributes. Including the attribute may be another object. Accordingly, the database creates a table with object attributes. In this case, the object itself is described in the application in any way possible.

What is the name of such a database structure (architecture)? And is there a standard for it? I would appreciate any article.

  • Are you talking about EAV? - Akina
  • Look, by the way, on a site this word. Surely you will find something useful - Stackoverflow.com/search?q=EAV+ - Nofate

2 answers 2

What you describe fits into the EAV (Entity-Attribute-Value) pattern.

In this approach, a table is created for objects (Entity), a dictionary of attributes (Attribute) and a table of values ​​of attributes of objects (Value).

If attributes can be of different types, then the attribute dictionary also describes the data type of each attribute, and the value table has a separate column for each data type or one column of the universal type. One of the types of data types may well be a foreign key to the table of objects.

enter image description here

    It is not called in any way, since it is a common design of tables, where a table is used that stores the attributes of objects. The only standard for this case may be the so-called normal forms , which are designed to save your database from various kinds of anomalies: inserts, deletes, etc.