Reduce repetitive information in database design

I am developing an application that, when users create a new account, several hundred data lines are filled in their account (predefined parameters, settings, etc.). Most users rarely, if ever, change the information in these tables. Are there any good design patterns to reduce duplicate data in database tables?

Some ideas that I have had so far:

  • Save predefined parameters in your own tables and save only user parameters for user tables. This seemingly reduced overhead, but I see the database calls becoming very difficult.

  • Create a new database for every 100 users or so, with a separate database for accounts that points to a user database. This, well, is not optimal.

  • Idea 3?

+3
source share
5 answers

Creating a new database for 100 users sounds like a crazy and inefficient idea.

? , - , . . , , .

+1

, .

1.

UserGroups /.

UserRoles/Rules , , / .

Users UserGroups UserRoles UserRules

, - ,

0

, , , , , . ( 1)

0

, , , ,

, -

0

, (, , , , ), .

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

The only problem is that the different default values ​​should be grouped into slightly smaller (in terms of the number of fields) tables, otherwise you will not get any benefit from this approach (i.e. if you put all the possible settings in one table record you you’ll have to duplicate everything as soon as the user changes only one field, and this will not bring any benefit).

0
source

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


All Articles