When I should use one to one relationship?

后端 未结 13 1652
面向向阳花
面向向阳花 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:46

    If data in one table is related to, but does not 'belong' to the entity described by the other, then that's a candidate to keep it separate.

    This could provide advantages in future, if the separate data needs to be related to some other entity, also.

提交回复
热议问题