Home > Net >  Database Management - Should I use multiple databases?
Database Management - Should I use multiple databases?

Time:06-10

I have an issue with the planning of my program. I am not sure what I should do.

Here my idea:

The program has users, the users can create persons, those persons have many attributes and every user can create multiple persons. Also there's a table 'todo' that is made to assign tasks to persons.

(-> = attributes, --> connected tables)

Users -> username, password, email, usertype, id

Person -> id, src, firstname, middlename(s), lastname, birthdate, description, height, favourites, dislikes, hates, boundaries, disorders, fronting --> personType, pronouns, source, fav Colors, fav Foods, kids (connection to "Person"), relationships (connection to "Person")

Todo -> id, due, title, description --> assignedTo (connection to "Person")

My issue: As you can see a person has multiple attributes and a user can create multiple persons with todos. And I am not sure how practical this is to handle, if the privacy is reassured and what the most efficient option is.

My Question:

  1. Should I use a system where every user gets its own database with his persons and todos and stuff? or
  2. Should I use 1 Database for everything? or
  3. is there even a better solution?

CodePudding user response:

I would only consider the 'multiple databases' solution if it was an answer a technical problem that you have (legacy datasources that you don't want to merge for instance).

The security concerns that you have regarding people accessing data that they shouldn't have is important, but the solution is a solid security model, and not necessarily segregating the data in multiple databases

Since you are starting your program and can choose your option in a more functional / data model driven approach, and as such the single database option is way more friendly.

You will be able to properly model and enforce the relationships between your objects, and define a solid model.

  • Related