Changes between Version 12 and Version 13 of ERdiagram


Ignore:
Timestamp:
09/24/25 23:15:48 (9 hours ago)
Author:
221007
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERdiagram

    v12 v13  
    13131. Person
    1414
    15 * **Primary Key (PK):** person_id
     15* **Primary Key (PK):** person_id - integer
    1616* **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
    2527
    26282. Institution
    2729
    28 * **Primary Key (PK):** institution_id
     30* **Primary Key (PK):** institution_id - integer
    2931* **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
    3537
    36383. Report
    3739
    38 * **Primary Key (PK):** report_id
     40* **Primary Key (PK):** report_id - integer
    3941* **Attributes:
    40   * report_type
    41   * date
    42   * notes
    43   * 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
    4446
    45474. !CrimeType
    4648
    47 * **Primary Key (PK):** crime_type_id
     49* **Primary Key (PK):** crime_type_id - integer
    4850* **Attributes:**
    49   * label
    50   * severity_level
     51  * label - text
     52  * severity_level - enum (LOW, MEDIUM, HIGH)
    5153
    5254
    53555. Diagnosis
    5456
    55 * **Primary Key (PK):** diagnosis_id
     57* **Primary Key (PK):** diagnosis_id - integer
    5658* **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
    6163
    62646. Doctor
    6365
    64 * **Primary Key (PK):** doctor_id
     66* **Primary Key (PK):** doctor_id - integer
    6567* **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
    7173
    72747. Role
    73 * **Primary Key (PK):** role_id
     75* **Primary Key (PK):** role_id - integer
    7476* **Attributes:**
    75   * role_name
    76   * description
     77  * role_name - integer
     78  * description - text
    7779
    78808. !FilterSession
    7981
    80 * **Primary Key (PK):** session_id
     82* **Primary Key (PK):** session_id - integer
    8183* **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)
    8587
    86889. !ReportiumUser
    8789
    88 * **Primary Key (PK):** reportium_user_id
     90* **Primary Key (PK):** user_id - integer
    8991* **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
    9498
    959910. !UserProfile
    96100
    97 * **Primary Key (PK):** profile_id
     101* **Primary Key (PK):** profile_id - integer
    98102* **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)
    104107
    105108==== Weak Entities ====
     
    1071101. Punishment
    108111
    109 * **Primary Key (PK):** punishment_id
     112* **Primary Key (PK):** punishment_id - integer
    110113* **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)
    114119
    1151202. !UserProfileLog
    116121
    117 * **Primary Key (PK):** log_id
     122* **Primary Key (PK):** log_id - integer
    118123* **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
    122127
    1231283. !ExportLog
    124129
    125 * **Primary Key (PK):** export_id
     130* **Primary Key (PK):** export_id - integer
    126131* **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)
    132137
    133138==== Report Subtypes ====
     
    136141* **Primary Key (PK):** report_id (inherited)
    137142* **Additional Attributes:**
    138   * field
    139   * description
     143  * institution_id - (Foreign Key to Institution Entity)
     144  * academic_field - text
     145  * description_of_report - text
    140146
    1411472. !CriminalReport
     
    143149* **Primary Key (PK):** report_id (inherited)
    144150* **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
    148155
    1491563. !MedicalReport
     
    151158* **Primary Key (PK):** report_id (inherited)
    152159* **Additional Attributes:**
    153   * doctor_surname
    154   * next_control_date
     160  * doctor_id - (Foreign Key to Doctor Entity)
     161  * next_control_date - date
    155162
    1561634. !EmploymentReport
     
    158165* **Primary Key (PK):** report_id (inherited)
    159166* **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