diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-07 18:59:41 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-07 18:59:41 -0700 |
| commit | afb4e61a62b07277e0b455df50bfe73da5aa4a66 (patch) | |
| tree | ad19a857cdf2695afa5a236307f4b3560ed0e471 /assignments/1 | |
| parent | 62ed1be77f687edb2d1f259813b56480197f2b5d (diff) | |
Extract duplication between instructors and students into profiles table
Diffstat (limited to 'assignments/1')
| -rw-r--r-- | assignments/1/course-administration.png | bin | 94102 -> 89660 bytes | |||
| -rw-r--r-- | assignments/1/course-administration.uml | 18 |
2 files changed, 11 insertions, 7 deletions
diff --git a/assignments/1/course-administration.png b/assignments/1/course-administration.png Binary files differindex a694734..9b54af0 100644 --- a/assignments/1/course-administration.png +++ b/assignments/1/course-administration.png diff --git a/assignments/1/course-administration.uml b/assignments/1/course-administration.uml index 418bddd..aa9046c 100644 --- a/assignments/1/course-administration.uml +++ b/assignments/1/course-administration.uml @@ -43,22 +43,24 @@ Table(course_assistants, "course_assistants") { Table(instructors, "instructors") { primary_key(id) BIGINT not_null(title) VARCHAR[255] - first_name VARCHAR[255] - last_name VARCHAR[255] - email_address VARCHAR[255] - phone_number VARCHAR[255] + foreign_key(profile_id) BIGINT fax_number VARCHAR[255] } Table(students, "students") { primary_key(id) BIGINT + foreign_key(profile_id) BIGINT + type INTEGER [0 undergraduate, 1 graduate] + postal_code VARCHAR[255] + gpa DECIMAL +} + +Table(profiles, "profiles") { + primary_key(id) BIGINT first_name VARCHAR[255] last_name VARCHAR[255] email_address VARCHAR[255] phone_number VARCHAR[255] - postal_code VARCHAR[255] - gpa DECIMAL - student_type INTEGER } Table(course_enrollments, "course_enrollments") { @@ -94,4 +96,6 @@ scheduled_courses --> instructors : "belongs to" instructors --> scheduled_courses : "has many" courses --> course_disciplines : "has many" course_disciplines --> disciplines : "belongs to" +students --> profiles : "belongs to" +instructors --> profiles : "belongs to" @enduml |
