| | 1 | '''Entity-Relationship Model v01''' |
| | 2 | |
| | 3 | '''Diagram''' |
| | 4 | |
| | 5 | |
| | 6 | '''Data Requirements''' |
| | 7 | • University: This entity stores information about universities. We need it to know which faculties, professors, and students belong to which university. |
| | 8 | |
| | 9 | º Candidate keys: Id (primary key). |
| | 10 | |
| | 11 | º Attributes: |
| | 12 | |
| | 13 | Id – number, required, unique |
| | 14 | |
| | 15 | Name – text, required, max 255 characters |
| | 16 | |
| | 17 | Location – text, optional, max 255 characters |
| | 18 | |
| | 19 | IsPrivate – boolean, required |
| | 20 | |
| | 21 | • Faculty: Represents a faculty inside a university. It helps organize students, professors, and subjects within that faculty. Each faculty belongs to one university. |
| | 22 | |
| | 23 | º Candidate keys: Id (primary key). |
| | 24 | |
| | 25 | º Attributes: |
| | 26 | |
| | 27 | Id – number, required, unique |
| | 28 | |
| | 29 | Name – text, required, max 255 characters |
| | 30 | |
| | 31 | Location – text, optional, max 255 characters |
| | 32 | |
| | 33 | Study_field – text, optional, max 255 characters |
| | 34 | |
| | 35 | University_Id – number, required, foreign key to University |
| | 36 | |
| | 37 | • Professor: This entity stores professors. Each professor works in a faculty and can teach subjects or advise students. |
| | 38 | |
| | 39 | º Candidate keys: Id (primary key) |
| | 40 | |
| | 41 | º Attributes: |
| | 42 | |
| | 43 | Id – number, required, unique |
| | 44 | |
| | 45 | Name – text, required, max 255 characters |
| | 46 | |
| | 47 | Surname – text, optional, max 255 characters |
| | 48 | |
| | 49 | Age – number, optional, 25–100 |
| | 50 | |
| | 51 | Address – text, optional, max 255 characters |
| | 52 | |
| | 53 | Faculty_Id – number, required, foreign key to Faculty |
| | 54 | |
| | 55 | • Student: This entity stores students. Each student belongs to a faculty and can enroll in many subjects. They can also have a professor as their adviser. |
| | 56 | |
| | 57 | º Candidate keys: Id (primary key). |
| | 58 | |
| | 59 | º Attributes: |
| | 60 | |
| | 61 | Id – number, required, unique |
| | 62 | |
| | 63 | Name – text, required, max 255 characters |
| | 64 | |
| | 65 | Surname – text, optional, max 255 characters |
| | 66 | |
| | 67 | Location – text, optional, max 255 characters |
| | 68 | |
| | 69 | Index – number, required, unique |
| | 70 | |
| | 71 | Faculty_Id – number, required, foreign key to Faculty |
| | 72 | |
| | 73 | Professor_Id – number, optional, foreign key to Professor |
| | 74 | |
| | 75 | • Subject: This entity stores courses or subjects. Each subject belongs to a faculty and is taught by a professor. Students can enroll in subjects. |
| | 76 | |
| | 77 | º Candidate keys: Id (primary key) |
| | 78 | |
| | 79 | º Attributes: |
| | 80 | |
| | 81 | Id – number, required, unique |
| | 82 | |
| | 83 | Name – text, required, max 255 characters |
| | 84 | |
| | 85 | Semester – text, optional, e.g., "Fall", "Spring" |
| | 86 | |
| | 87 | Credits – number, required, 1–15 |
| | 88 | |
| | 89 | Faculty_Id – number, required, foreign key to Faculty |
| | 90 | |
| | 91 | Professor_Id – number, required, foreign key to Professor |
| | 92 | |
| | 93 | • Student_Subject: This relationship shows which students are enrolled in which subjects. It also stores their grades, attendance, and enrollment status. |
| | 94 | |
| | 95 | º Candidate keys: (Student_Id, Subject_Id) (composite primary key) |
| | 96 | |
| | 97 | º Attributes: |
| | 98 | |
| | 99 | Final_Grade – number, optional, 5–10 or pass/fail |
| | 100 | |
| | 101 | Status – text, optional, e.g., "Enrolled", "Completed", "Dropped" |
| | 102 | |
| | 103 | Enrollment_Date – date, optional |
| | 104 | |
| | 105 | Absence_Count – number, optional, 0–100 |
| | 106 | |
| | 107 | Student_Id – number, required, foreign key to Student |
| | 108 | |
| | 109 | Subject_Id – number, required, foreign key to Subject |
| | 110 | |
| | 111 | Entity-Relationship Model History |
| | 112 | |
| | 113 | v01: First version of the conceptual ER model including University, Faculty, Professor, Student, Subject, and Student_Subject relationship. Attributes, primary keys, and relationships defined. |