Answer the question
In order to leave comments, you need to log in
What is the meaning of a one-to-one relationship?
users
table phones table
We create a foreign key - user_id in the phones table And make it unique
As a result, one user has one phone, also one phone belongs to one user
What's the point? Why not just create a phone column in the users table?
Answer the question
In order to leave comments, you need to log in
If there is no separate entity "phone" with its own parameters (there is only a number), then it makes no sense to do so.
If there is (for example, an IP phone with all the settings), then this is simply a consolidation of the fact that one specific unique user is assigned to each phone.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question