数据库系统概论:ER Diagram
Entity

- Rectangles represent entity sets.
- Attributes listed inside entity rectangle
- Underline indicates primary key attributes
Relationship


Relationship Sets with Attributes

One-to-One

One-to-Many / Many-to-One
有箭头的那边是 One


Many-to-Many
两边都没有箭头

Total participation
每个学生必须有一个老师,有要求的那边是双线

Others

每个老师可以没有学生,或者可以有无限个学生
每个学生只能有一个老师
1 | Novel(ID, name, words, type, publisherID, writerID), foreign key: publisherID (reference publisher(ID)), writerID (reference writer(ID)) |