Changes between Version 2 and Version 3 of ERModel
- Timestamp:
- 01/19/26 16:47:46 (3 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERModel
v2 v3 24 24 ||password||VARCHAR(128)||NOT NULL||Hashed password for authentication|| 25 25 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. 28 28 29 29 '''Candidate Keys:''' … … 50 50 ||description||VARCHAR(128)||NOT NULL||Detailed description including specifications, capacity, or usage instructions|| 51 51 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. 54 54 55 55 '''Candidate Keys:''' … … 92 92 ||created_at||TIMESTAMP||NOT NULL||When the reservation was created in the system|| 93 93 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. 96 96 97 97 '''Candidate Keys:''' … … 106 106 ||end_time||TIME||NOT NULL||When the availability window ends (must be after start_time)|| 107 107 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. 110 110 111 111 '''Candidate Keys:''' … … 122 122 === Relationships === 123 123 124 ==== has_type (Users - UserTypes) ====124 ==== has_type (Users - !UserTypes) ==== 125 125 '''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. 126 126 … … 129 129 '''Participation:''' 130 130 * 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) 132 132 133 133 ==== makes (Users - Reservations) ==== … … 158 158 * Resources: Partial (a resource may have no reservations) 159 159 160 ==== categorized_as (Resources - ResourceTypes) ====160 ==== categorized_as (Resources - !ResourceTypes) ==== 161 161 '''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. 162 162 … … 165 165 '''Participation:''' 166 166 * 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) 168 168 169 169 ==== located_at (Resources - Locations) ==== … … 176 176 * Locations: Partial (a location may have no resources assigned) 177 177 178 ==== available_during (Resources - AvailabilitySlots) ====178 ==== available_during (Resources - !AvailabilitySlots) ==== 179 179 '''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. 180 180 … … 183 183 '''Participation:''' 184 184 * 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) ==== 188 188 '''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. 189 189 … … 192 192 '''Participation:''' 193 193 * Reservations: Partial (only recurring reservations have patterns) 194 * RecurrencePatterns: Partial (patterns exist independently)194 * !RecurrencePatterns: Partial (patterns exist independently) 195 195 196 196 == Entity-Relationship Model History == … … 199 199 ||v01||2025-01-19||Initial version with 8 entities and 8 relationships|| 200 200 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)
