What is the correct table naming convention to use for the one-to-one relationship?

34 views
Skip to first unread message

N Insaidoo

unread,
Mar 17, 2018, 5:25:06 AM3/17/18
to NotORM

Allysson David

unread,
Mar 17, 2018, 9:01:08 AM3/17/18
to not...@googlegroups.com
I believe that would be solved by adding a computers_id fk inside your employees table.

2018-03-17 6:25 GMT-03:00 N Insaidoo <csproj...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "NotORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to notorm+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Allysson David

unread,
Mar 17, 2018, 9:33:02 AM3/17/18
to not...@googlegroups.com
Let me add that it would work like N:N in doing so, so you'd have to add an UNIQUE constraint to have a 1:1.
But why would you have a 1:1 relationship instead of just storing everything in the same table? Because of mutable and unmutable data separation maybe? If so, I can kinda understand...
Reply all
Reply to author
Forward
Message has been deleted
0 new messages