Entity Relationship Diagram. How does the IS A relationship translate into tables?

前端 未结 4 679
面向向阳花
面向向阳花 2021-02-05 09:46

\"My

I was simply wondering, how an ISA relationship in an ER diagram would transl

4条回答
  •  臣服心动
    2021-02-05 10:42

    there are 4 options you can use to map this into an ER,

    option 1

    • Person(SIN,Name)
    • Student(SIN,GPA)
    • Teacher(SIN,Salary)

    option 2 Since this is a covering relationship, option 2 is not a good match.

    • Student(SIN,Name,GPA)
    • Teacher(SIN,Name,Salary)

    option 3

    • Person(SIN,Name,GPA,Salary,Person_Type) person type can be student/teacher

    option 4

    • Person(SIN,Name,GPA,Salary,Student,Teacher) Student and Teacher are bool type fields, it can be yes or no,a good option for overlapping

    Since the sub classes don't have much attributes, option 3 and option 4 are better to map this into an ER

提交回复
热议问题