Translating relationship attributes from ER diagram into SQL

后端 未结 2 1143
野的像风
野的像风 2021-02-09 22:26

Currently trying to get to grips with SQL for the first time, so I am working through a few problems. Here is a sample database spec:

Students (name, gend

2条回答
  •  走了就别回头了
    2021-02-09 23:10

    In response to Cohagen this stackoverflow post suggests that many to many relationships like Supervise can be represented by keeping the relationship table even if it has no attributes. In contrast the Do table lies between a many to one relationship and doesn't have attributes so we can get rid of it and simply add a foreign key reference to the project table in students.

提交回复
热议问题