Is the general model antipattern?

Now I have something that I have not seen before: the database is really shared. For example: instead of a specific type, we have a general: device, and it refers to a table of custom properties.

Unfortunately, the model above its entities represents these tables, so the model does not talk about business at all.

At the end of programming, it’s rather confusing: no one has developed or defined which user properties should be in the general table, so it’s hard to figure out where to put them. And you need a lot of code to easily retrieve a single attribute.

Do you think that a common database with a common model is some antipattern? Any pro?

+3
source share
3 answers

In the past, I have worked with a fairly general database. It was a smart way to manage a huge system with very often changing requirements and unexpected interconnections.

The execution, however, was of 3 types of tables: the main "general" ones, in which certain data types were stored, a link table (table from, link from, table in, link to, record type) and a table of tables, determining which data types are stored and as. Of course, this created some overhead, but this was offset by the settings of the engine, which really accelerated general requests and supported complex reasonable (and rare) ones.

, , , , . , , , . " ", ( ) .

+2

. , .

+2

- , , . //, , . , ( ).

+1
source

Source: https://habr.com/ru/post/1735374/


All Articles