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

后端 未结 9 1788
遥遥无期
遥遥无期 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.

    0 讨论(0)
  • 2021-02-07 12:44

    Parent and Child or Owner and Child is the generally accepted solutions.

    0 讨论(0)
  • 2021-02-07 12:46

    related_id or associated_student_id would be my preference.

    0 讨论(0)
提交回复
热议问题