Alternative to “master” and “slave” in entity relationship?

后端 未结 9 1789
遥遥无期
遥遥无期 2021-02-07 11:51

Example: I have two tables in my database called classA and classB, and one table called classA_classB. The last one just defi

9条回答
  •  遥遥无期
    2021-02-07 12:40

    Depends on whether or not the relationship (lets call it R) is symmetric. If so then person1, person2 is fine since R(person1, person2) = R(person2, person1). If they are not symmetric then the names should probably reflect an "agent and patient" relationship. So use a word to denote the agent and one to denote the patient, e.g. Befriender, Friend.

提交回复
热议问题