I have many objects, each of which can have many different attributes. many attributes overlap; for example, many objects have a name attribute. Since there are many types of objects, if there is a table built for each set of objects with the same set of attributes, this will take many tables.
I am currently using mysql and it is saved this way.
object_id|attribute_id|data
There are several tables, in different tables - different data types. For example, in an Integer table, it stores integers
Therefore, I can store all the objects in the system, and you can still filter and sort according to the attribute data. This makes queries a bit more complicated, and I don't think it is efficient.
Is this just a way to do this in mysql or other relational databases? Should I try to find other database models for this problem?
EDIT
I did some research, it seems to me that I need a document-oriented database with the power of SQL.
source
share