Changes between Version 2 and Version 3 of ERModel


Ignore:
Timestamp:
01/19/26 16:47:46 (3 weeks ago)
Author:
221511
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v2 v3  
    2424||password||VARCHAR(128)||NOT NULL||Hashed password for authentication||
    2525
    26 ==== UserTypes ====
    27 '''Description:''' UserTypes categorizes users into different roles within the system. This entity enables role-based access control, distinguishing between teaching staff, students, and faculty administrators. Each role has different permissions for viewing, reserving, and managing resources.
     26==== !UserTypes ====
     27'''Description:''' !UserTypes categorizes users into different roles within the system. This entity enables role-based access control, distinguishing between teaching staff, students, and faculty administrators. Each role has different permissions for viewing, reserving, and managing resources.
    2828
    2929'''Candidate Keys:'''
     
    5050||description||VARCHAR(128)||NOT NULL||Detailed description including specifications, capacity, or usage instructions||
    5151
    52 ==== ResourceTypes ====
    53 '''Description:''' ResourceTypes categorizes resources into different types for easier navigation and filtering. Examples include 'Laboratory Equipment', 'Classroom', 'Software License', 'Projector', etc. The is_physical attribute distinguishes between physical resources (that have a location) and digital resources.
     52==== !ResourceTypes ====
     53'''Description:''' !ResourceTypes categorizes resources into different types for easier navigation and filtering. Examples include 'Laboratory Equipment', 'Classroom', 'Software License', 'Projector', etc. The is_physical attribute distinguishes between physical resources (that have a location) and digital resources.
    5454
    5555'''Candidate Keys:'''
     
    9292||created_at||TIMESTAMP||NOT NULL||When the reservation was created in the system||
    9393
    94 ==== AvailabilitySlots ====
    95 '''Description:''' AvailabilitySlots defines recurring time windows when resources are available for reservation. Rather than storing availability for each specific date, this entity stores patterns (e.g., "Mondays 9:00-17:00") that apply weekly. This simplifies availability management and reduces data redundancy.
     94==== !AvailabilitySlots ====
     95'''Description:''' !AvailabilitySlots defines recurring time windows when resources are available for reservation. Rather than storing availability for each specific date, this entity stores patterns (e.g., "Mondays 9:00-17:00") that apply weekly. This simplifies availability management and reduces data redundancy.
    9696
    9797'''Candidate Keys:'''
     
    106106||end_time||TIME||NOT NULL||When the availability window ends (must be after start_time)||
    107107
    108 ==== RecurrencePatterns ====
    109 '''Description:''' RecurrencePatterns enables reservations to repeat automatically according to defined rules. This is useful for recurring events like weekly lectures or monthly equipment maintenance. Instead of creating multiple individual reservations, a single reservation can reference a pattern that defines how it repeats.
     108==== !RecurrencePatterns ====
     109'''Description:''' !RecurrencePatterns enables reservations to repeat automatically according to defined rules. This is useful for recurring events like weekly lectures or monthly equipment maintenance. Instead of creating multiple individual reservations, a single reservation can reference a pattern that defines how it repeats.
    110110
    111111'''Candidate Keys:'''
     
    122122=== Relationships ===
    123123
    124 ==== has_type (Users - UserTypes) ====
     124==== has_type (Users - !UserTypes) ====
    125125'''Description:''' Each user is assigned exactly one user type that determines their role and permissions in the system. A user type can be assigned to many users. This is a mandatory relationship for users (total participation) since every user must have a defined role.
    126126
     
    129129'''Participation:'''
    130130 * Users: Total (every user must have a type)
    131  * UserTypes: Partial (a type may exist without assigned users)
     131 * !UserTypes: Partial (a type may exist without assigned users)
    132132
    133133==== makes (Users - Reservations) ====
     
    158158 * Resources: Partial (a resource may have no reservations)
    159159
    160 ==== categorized_as (Resources - ResourceTypes) ====
     160==== categorized_as (Resources - !ResourceTypes) ====
    161161'''Description:''' Each resource belongs to exactly one resource type for categorization purposes. This enables filtering and determines whether the resource is physical (requires location) or digital. The relationship is mandatory for resources.
    162162
     
    165165'''Participation:'''
    166166 * Resources: Total (every resource must have a type)
    167  * ResourceTypes: Partial (a type may exist without resources)
     167 * !ResourceTypes: Partial (a type may exist without resources)
    168168
    169169==== located_at (Resources - Locations) ====
     
    176176 * Locations: Partial (a location may have no resources assigned)
    177177
    178 ==== available_during (Resources - AvailabilitySlots) ====
     178==== available_during (Resources - !AvailabilitySlots) ====
    179179'''Description:''' This many-to-many relationship defines when each resource is available for reservation. A resource can have multiple availability slots (e.g., available Monday-Friday 8:00-18:00), and the same slot pattern can apply to multiple resources.
    180180
     
    183183'''Participation:'''
    184184 * Resources: Partial (some resources may be available anytime)
    185  * AvailabilitySlots: Partial (slots are defined independently)
    186 
    187 ==== follows (Reservations - RecurrencePatterns) ====
     185 * !AvailabilitySlots: Partial (slots are defined independently)
     186
     187==== follows (Reservations - !RecurrencePatterns) ====
    188188'''Description:''' Reservations can optionally follow a recurrence pattern for repeating bookings. When a reservation references a pattern, the system generates or recognizes repeated occurrences according to the pattern rules. Most reservations are one-time and do not use this relationship.
    189189
     
    192192'''Participation:'''
    193193 * Reservations: Partial (only recurring reservations have patterns)
    194  * RecurrencePatterns: Partial (patterns exist independently)
     194 * !RecurrencePatterns: Partial (patterns exist independently)
    195195
    196196== Entity-Relationship Model History ==
     
    199199||v01||2025-01-19||Initial version with 8 entities and 8 relationships||
    200200
    201 == Attachments ==
    202 
    203  * [[attachment:diagrams/ERModel_v01.xml|ERModel_v01.xml]] (TerraER source file)
    204  * [[attachment:diagrams/ERModel_v01.png|ERModel_v01.png]] (Exported diagram image)