When we need to use 1-to-1 relationship in database design?

后端 未结 4 739
眼角桃花
眼角桃花 2020-12-02 00:45

When do we need to use a 1-to-1 relationship in database design? In my opinion, if two tables are in a 1-to-1 relationship, they can be combined into one table. Is this true

4条回答
  •  臣服心动
    2020-12-02 00:55

    yes in general.

    One exception may be if you want to assign privileges differently to a subset of columns.

    also consider that this is true only when both sides are required.

提交回复
热议问题