Answer the question
In order to leave comments, you need to log in
What is this attitude?
I have a users table and the users_progress table
users contains fields (full name, login, password) that should not change
users_progress contains fields (level and the like) that are constantly changing The
question is, what kind of relationship is this: one to one or one to many or in general Shouldn't you bother and merge these tables?
Answer the question
In order to leave comments, you need to log in
If each user can only have one level, then it is one to one . If a user can have multiple levels, then one to many . In the second case, it is necessary to separate exactly. The first depends on the nuances of a particular system. For example, the degree of logical connectivity of data - how much the data in the table users
makes sense without the data in the table users_progress
. Or the nature of working with data: if data from both tables is never selected without each other, then you will have some resources spent on unnecessary joins , but if some of the selections use only data from users
, and some only from users_progress
, then finding them will already waste resources in one table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question