Changes between Version 12 and Version 13 of ERdiagram
- Timestamp:
- 09/24/25 23:15:48 (9 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERdiagram
v12 v13 13 13 1. Person 14 14 15 * **Primary Key (PK):** person_id 15 * **Primary Key (PK):** person_id - integer 16 16 * **Attributes:** 17 * name 18 * surname 19 * address 20 * gender 21 * date_of_birth 22 * contact_phone 23 * is_alive 24 * is_stub 17 * name - text 18 * surname - text 19 * address - text 20 * gender - enum (MALE, FEMALE) 21 * date_of_birth - date 22 * date_of_death - date 23 * contact_phone - text 24 * is_alive - boolean 25 * is_stub - boolean 26 * embg - text 25 27 26 28 2. Institution 27 29 28 * **Primary Key (PK):** institution_id 30 * **Primary Key (PK):** institution_id - integer 29 31 * **Attributes:** 30 * name 31 * address 32 * type 33 * year_established 34 * city 32 * name - text 33 * address - text 34 * type - enum (PRIMARY SCHOOL, HIGH SCHOOL, UNIVERSITY, ACADEMY) 35 * year_established - integer 36 * city - text 35 37 36 38 3. Report 37 39 38 * **Primary Key (PK):** report_id 40 * **Primary Key (PK):** report_id - integer 39 41 * **Attributes: 40 * report_type 41 * date42 * notes43 * person_id (Foreign Key)42 * report_type - enum (CRIMINAL, MEDICAL, ACADEMIC, EMPLOYMENT) 43 * created_at - date 44 * summary - text 45 * person_id - (Foreign Key to Person Entity) - integer 44 46 45 47 4. !CrimeType 46 48 47 * **Primary Key (PK):** crime_type_id 49 * **Primary Key (PK):** crime_type_id - integer 48 50 * **Attributes:** 49 * label 50 * severity_level 51 * label - text 52 * severity_level - enum (LOW, MEDIUM, HIGH) 51 53 52 54 53 55 5. Diagnosis 54 56 55 * **Primary Key (PK):** diagnosis_id 57 * **Primary Key (PK):** diagnosis_id - integer 56 58 * **Attributes:** 57 * description 58 * therapy 59 * severity 60 * is_chronic 59 * description - text 60 * therapy - text 61 * severity - enum (LOW, MEDIUM, HIGH) 62 * is_chronic - boolean 61 63 62 64 6. Doctor 63 65 64 * **Primary Key (PK):** doctor_id 66 * **Primary Key (PK):** doctor_id - integer 65 67 * **Attributes:** 66 * surname 67 * years_of_experience 68 * specialization 69 * name 70 * is_active 68 * surname - text 69 * years_of_experience - integer 70 * specialization - text 71 * name - text 72 * is_active - boolean 71 73 72 74 7. Role 73 * **Primary Key (PK):** role_id 75 * **Primary Key (PK):** role_id - integer 74 76 * **Attributes:** 75 * role_name 76 * description 77 * role_name - integer 78 * description - text 77 79 78 80 8. !FilterSession 79 81 80 * **Primary Key (PK):** session_id 82 * **Primary Key (PK):** session_id - integer 81 83 * **Attributes:** 82 * filter_description 83 * searched_at 84 * user_id (Foreign Key)84 * filter_description - text 85 * searched_at - timestamp 86 * user_id - (Foreign Key to ReportiumUser Entity) 85 87 86 88 9. !ReportiumUser 87 89 88 * **Primary Key (PK):** reportium_user_id90 * **Primary Key (PK):** user_id - integer 89 91 * **Attributes:** 90 * password_hash 91 * is_active 92 * email 93 * surname 92 * password_hash - text 93 * is_active - boolean 94 * email - text (email) 95 * surname - text 96 * name - text 97 * created_at - timestamp 94 98 95 99 10. !UserProfile 96 100 97 * **Primary Key (PK):** profile_id 101 * **Primary Key (PK):** profile_id - integer 98 102 * **Attributes:** 99 * profile_created_at 100 * user_id (Foreign Key) 101 * username 102 * has_fs_own 103 * has_fs_stored 103 * profile_created_at - timestamp 104 * user_id - (Foreign Key to ReportiumUser Entity) 105 * username - text 106 * role_id - (Foreign Key to Role Entity) 104 107 105 108 ==== Weak Entities ==== … … 107 110 1. Punishment 108 111 109 * **Primary Key (PK):** punishment_id 112 * **Primary Key (PK):** punishment_id - integer 110 113 * **Attributes:** 111 * value 112 * value_unit 113 * punishment_type 114 * value_unit - enum (EUROS, YEARS) 115 * punishment_type - enum (FINE, PRISON) 116 * fine_to_pay - double 117 * release_date - date 118 * report_id - (Foreign Key to Report Entity) 114 119 115 120 2. !UserProfileLog 116 121 117 * **Primary Key (PK):** log_id 122 * **Primary Key (PK):** log_id - integer 118 123 * **Attributes:** 119 * change_description 120 * profile_id (Foreign Key)121 * changed_at 124 * change_description - text 125 * profile_id - (Foreign Key to !UserProfile Entity) 126 * changed_at - timestamp 122 127 123 128 3. !ExportLog 124 129 125 * **Primary Key (PK):** export_id 130 * **Primary Key (PK):** export_id - integer 126 131 * **Additional Attributes:** 127 * export_date 128 * export_format 129 * filter_summary 130 * file_name 131 * session_id (Foreign Key)132 * export_date - timestamp 133 * export_format - enum (CSV, PDF) 134 * filter_summary - text 135 * file_name - text 136 * session_id - (Foreign Key to !FilterSession Entity) 132 137 133 138 ==== Report Subtypes ==== … … 136 141 * **Primary Key (PK):** report_id (inherited) 137 142 * **Additional Attributes:** 138 * field 139 * description 143 * institution_id - (Foreign Key to Institution Entity) 144 * academic_field - text 145 * description_of_report - text 140 146 141 147 2. !CriminalReport … … 143 149 * **Primary Key (PK):** report_id (inherited) 144 150 * **Additional Attributes:** 145 * location 146 * resolved 147 * from_type 151 * location - text 152 * resolved - boolean 153 * crime_type_id - (Foreign Key to !CrimeType Entity) 154 * descriptive_punishment - text 148 155 149 156 3. !MedicalReport … … 151 158 * **Primary Key (PK):** report_id (inherited) 152 159 * **Additional Attributes:** 153 * doctor_ surname154 * next_control_date 160 * doctor_id - (Foreign Key to Doctor Entity) 161 * next_control_date - date 155 162 156 163 4. !EmploymentReport … … 158 165 * **Primary Key (PK):** report_id (inherited) 159 166 * **Additional Attributes:** 160 * position_description 161 * start_date 162 * end_date 163 * income_per_month 167 * position_description - text 168 * start_date - date 169 * end_date - date 170 * income_per_month - double