A
A
Alexey2019-12-09 17:33:22
Data storage
Alexey, 2019-12-09 17:33:22

How is the data of registered users usually stored?

Friends!
(Like I checked, I didn’t find such an article)
How should I store the data of registered users of the site?
(In my case, this is a SQL database)
And a small clarification, each user can accumulate certain personal data (that is, he didn’t stupidly register and go under his login, but Registered and each user saves his materials under his profile .. )
Here's how I reasoned:
in your project, for example, when a new user registers, what is usually better for him to create:
Method 1 Necessary SQL tables in an ALREADY EXISTING GENERAL database - with the appropriate rights to edit these same tables.
or
Method 2in general, CREATE A SEPARATE SQL DATABASE for EACH user, such as
base_user_id_001
base_user_id_002
, etc.
Method 3 Or should they all (users) simply use the ALREADY EXISTING GENERAL database and ALREADY EXISTING SQL tables, and how is the USER distinguished from the USER?
A Question of Storage Philosophy

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2019-12-09
@SagePtr

Usually they store in one table for all users, they don’t create new tables separately for each user, they just store belonging to a specific user in each record.
Users do not need direct access to the database.

X
xmoonlight, 2019-12-09
@xmoonlight

There are only two types of level objects:
Users / Services and Rights (for them)
The service (this is a service user; inside the system) knows the user (service user) only by id, unless explicit access is allowed for this service to the user's data through the rights of the service.
Upper level - controls access to the lower ones.
The end.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question