When I should use one to one relationship?

后端 未结 13 1572
面向向阳花
面向向阳花 2020-11-27 11:32

Sorry for that noob question but is there any real needs to use one-to-one relationship with tables in your database? You can implement all necessary fields inside one table

13条回答
  •  [愿得一人]
    2020-11-27 11:47

    not very often.

    you may find some benefit if you need to implement some security - so some users can see some of the columns (table1) but not others (table2)..

    of course some databases (Oracle) allow you to do this kind of security in the same table, but some others may not.

提交回复
热议问题