| 4 | | This page contains the Entity–Relationship (ER) model description and diagrams for the Wedding Planner system. The ER model captures the core entities, their attributes, and relationships required to support wedding planning, event organization, guest management, and service reservations. |
| 5 | | |
| 6 | | == Entity-Relationship Model Wedding_Planner |
| | 4 | This page describes the Entity–Relationship (ER) model of the Wedding Planner system. The ER model defines the main entities, their attributes, and the relationships between them, in order to support wedding planning, event organization, guest management, and service reservations. |
| | 5 | |
| | 6 | == Entity-Relationship Model: Wedding Planner |
| 16 | | The User entity represents a registered person who uses the system to organize and manage weddings and related events. It stores personal and contact information and acts as the main system actor. A user can create and manage multiple weddings, invite guests, and reserve services. This entity is modeled separately to centralize user data, support authentication, and establish ownership of weddings. |
| 17 | | |
| 18 | | Candidate keys: |
| 19 | | |
| 20 | | user_id – selected as the primary key because it is system-generated, stable, and unique |
| 21 | | |
| 22 | | email – candidate key because it is unique per user, but not chosen as primary since it may change |
| 23 | | |
| 24 | | Attributes: |
| 25 | | |
| 26 | | user_id – numeric, required |
| 27 | | |
| 28 | | first_name – text, required |
| 29 | | |
| 30 | | last_name – text, required |
| 31 | | |
| 32 | | email – text, required, valid email format |
| 33 | | |
| 34 | | phone_number – text, optional |
| 35 | | |
| 36 | | gender – text, optional |
| 37 | | |
| 38 | | birthday – date, optional |
| | 16 | The User entity represents a registered person who uses the system to organize and manage weddings. A user can create and manage multiple weddings and is responsible for all planning activities. This entity stores personal and contact information and represents the owner of weddings in the system. |
| | 17 | |
| | 18 | Candidate keys: |
| | 19 | user_id – selected as the primary key because it is system-generated and unique |
| | 20 | email – candidate key because it is unique per user, but not selected as primary since it may change |
| | 21 | |
| | 22 | Attributes: |
| | 23 | user_id – numeric, required |
| | 24 | first_name – text, required |
| | 25 | last_name – text, required |
| | 26 | email – text, required |
| | 27 | phone_number – text, optional |
| | 28 | gender – text, optional |
| | 29 | birthday – date, optional |
| 43 | | The Wedding entity represents a specific wedding being planned and managed within the system. It is the central entity that connects all guests, events, reservations, and service bookings. Modeling it separately allows the system to manage multiple weddings independently and associate all related data consistently. |
| 44 | | |
| 45 | | Candidate keys: |
| 46 | | |
| 47 | | wedding_id – selected as the primary key as a unique system-generated identifier |
| 48 | | |
| 49 | | Attributes: |
| 50 | | |
| 51 | | wedding_id – numeric, required |
| 52 | | |
| 53 | | date – date, required |
| 54 | | |
| 55 | | budget – numeric, optional |
| 56 | | |
| 57 | | notes – text, optional |
| 58 | | |
| 59 | | type – text, optional |
| 60 | | |
| 61 | | status – text, optional |
| | 34 | The Wedding entity represents a specific wedding being planned in the system. It is the central entity that connects guests, events, and all service bookings. Each wedding belongs to one user and acts as the main context for all related data. |
| | 35 | |
| | 36 | Candidate keys: |
| | 37 | wedding_id – selected as the primary key because it uniquely identifies each wedding |
| | 38 | |
| | 39 | Attributes: |
| | 40 | wedding_id – numeric, required |
| | 41 | date – date, required |
| | 42 | budget – numeric, optional |
| | 43 | notes – text, optional |
| | 44 | type – text, optional |
| | 45 | status – text, optional |
| 66 | | The Event entity represents individual events associated with a wedding, such as ceremonies, receptions, or celebrations. Modeling events separately allows each wedding to have multiple scheduled events with different times and purposes. |
| 67 | | |
| 68 | | Candidate keys: |
| 69 | | |
| 70 | | event_id – selected as the primary key because it uniquely identifies each event |
| 71 | | |
| 72 | | Attributes: |
| 73 | | |
| 74 | | event_id – numeric, required |
| 75 | | |
| 76 | | event_type – text, required |
| 77 | | |
| 78 | | date – date, required |
| 79 | | |
| 80 | | start_time – time, required |
| 81 | | |
| 82 | | end_time – time, required |
| 83 | | |
| 84 | | status – text, required |
| | 50 | The Event entity represents individual events related to a wedding, such as a ceremony or reception. Each wedding can have multiple events, scheduled at different times. |
| | 51 | |
| | 52 | Candidate keys: |
| | 53 | event_id – selected as the primary key |
| | 54 | |
| | 55 | Attributes: |
| | 56 | event_id – numeric, required |
| | 57 | event_type – text, required |
| | 58 | date – date, required |
| | 59 | start_time – time, required |
| | 60 | end_time – time, required |
| | 61 | status – text, required |
| | 62 | |
| | 63 | == Entity: Guest |
| | 64 | |
| | 65 | Explanation: |
| | 66 | The Guest entity represents people invited to a wedding. Guests do not need system accounts, therefore they are modeled separately from users. |
| | 67 | |
| | 68 | Candidate keys: |
| | 69 | guest_id – selected as the primary key |
| | 70 | |
| | 71 | Attributes: |
| | 72 | guest_id – numeric, required |
| | 73 | first_name – text, required |
| | 74 | last_name – text, required |
| | 75 | email – text, optional |
| 89 | | The Event_RSVP entity stores responses from guests regarding their attendance at specific events. It is required to track confirmations, declines, and response dates for event planning purposes. |
| 90 | | |
| 91 | | Candidate keys: |
| 92 | | |
| 93 | | response_id – selected as the primary key because it uniquely identifies each RSVP record |
| 94 | | |
| 95 | | Attributes: |
| 96 | | |
| 97 | | response_id – numeric, required |
| 98 | | |
| 99 | | status – text, required |
| 100 | | |
| 101 | | response_date – date, required |
| 102 | | |
| 103 | | == Entity: Guest |
| 104 | | |
| 105 | | Explanation: |
| 106 | | The Guest entity represents individuals invited to a wedding. Guests do not need system accounts, therefore they are modeled separately from users. This allows flexible guest management without authentication requirements. |
| 107 | | |
| 108 | | Candidate keys: |
| 109 | | |
| 110 | | guest_id – selected as the primary key |
| 111 | | |
| 112 | | Attributes: |
| 113 | | |
| 114 | | guest_id – numeric, required |
| 115 | | |
| 116 | | first_name – text, required |
| 117 | | |
| 118 | | last_name – text, required |
| 119 | | |
| 120 | | email – text, optional |
| | 80 | The Event_RSVP entity stores guest responses to event invitations. It allows tracking whether a guest has accepted or declined an invitation and when the response was given. |
| | 81 | |
| | 82 | Candidate keys: |
| | 83 | (guest_id, event_id) – natural composite key |
| | 84 | response_id – surrogate primary key used in the relational model |
| | 85 | |
| | 86 | Attributes: |
| | 87 | response_id – numeric, required |
| | 88 | status – text, required |
| | 89 | response_date – date, required |
| 125 | | The Attendance entity represents the actual participation of guests in wedding events. It allows tracking attendance status, assigned roles, and seating arrangements. Seating information is optional, as not all events require tables (e.g., ceremonies). |
| 126 | | |
| 127 | | Candidate keys: |
| 128 | | |
| 129 | | attendance_id – selected as the primary key |
| 130 | | |
| 131 | | Attributes: |
| 132 | | |
| 133 | | attendance_id – numeric, required |
| 134 | | |
| 135 | | status – text, required |
| 136 | | |
| 137 | | table_number – numeric, optional |
| 138 | | |
| 139 | | role – text, required |
| | 94 | The Attendance entity represents the actual participation of guests in events. It stores attendance status, guest role, and seating information when applicable. Seating is optional because not all events require tables. |
| | 95 | |
| | 96 | Candidate keys: |
| | 97 | (guest_id, event_id) – natural composite key |
| | 98 | attendance_id – surrogate primary key used in the relational model |
| | 99 | |
| | 100 | Attributes: |
| | 101 | attendance_id – numeric, required |
| | 102 | status – text, required |
| | 103 | table_number – numeric, optional |
| | 104 | role – text, required |
| 151 | | |
| 152 | | venue_id – numeric, required |
| 153 | | |
| 154 | | name – text, required |
| 155 | | |
| 156 | | location – text, required |
| 157 | | |
| 158 | | city – text, required |
| 159 | | |
| 160 | | address – text, required |
| 161 | | |
| 162 | | capacity – numeric, required |
| 163 | | |
| 164 | | menu – text, optional |
| 165 | | |
| 166 | | phone_number – text, optional |
| 167 | | |
| 168 | | price_per_guest – numeric, required |
| | 115 | venue_id – numeric, required |
| | 116 | name – text, required |
| | 117 | location – text, required |
| | 118 | city – text, required |
| | 119 | address – text, required |
| | 120 | capacity – numeric, required |
| | 121 | menu – text, optional |
| | 122 | phone_number – text, optional |
| | 123 | price_per_guest – numeric, required |
| 195 | | |
| 196 | | booking_id – numeric, required |
| 197 | | |
| 198 | | date – date, required |
| 199 | | |
| 200 | | start_time – time, required |
| 201 | | |
| 202 | | end_time – time, required |
| 203 | | |
| 204 | | status – text, required |
| 205 | | |
| 206 | | price – numeric, required |
| | 146 | booking_id – numeric, required |
| | 147 | date – date, required |
| | 148 | start_time – time, required |
| | 149 | end_time – time, required |
| | 150 | status – text, required |
| | 151 | price – numeric, required |
| 260 | | |
| 261 | | band_id – numeric, required |
| 262 | | |
| 263 | | band_name – text, required |
| 264 | | |
| 265 | | genre – text, required |
| 266 | | |
| 267 | | equipment – text, optional |
| 268 | | |
| 269 | | phone_number – text, required |
| 270 | | |
| 271 | | price_per_hour – numeric, required |
| | 192 | band_id – numeric, required |
| | 193 | band_name – text, required |
| | 194 | genre – text, required |
| | 195 | equipment – text, optional |
| | 196 | phone_number – text, required |
| | 197 | price_per_hour – numeric, required |
| 332 | | === User – Wedding |
| 333 | | |
| 334 | | One User can organize multiple Weddings (1:N) |
| 335 | | |
| 336 | | Each Wedding belongs to exactly one User (mandatory) |
| 337 | | |
| 338 | | === Wedding – Event |
| 339 | | |
| 340 | | One Wedding can have multiple Events (1:N) |
| 341 | | |
| 342 | | Each Event belongs to exactly one Wedding |
| 343 | | |
| 344 | | === Wedding – Guest |
| 345 | | |
| 346 | | One Wedding can invite multiple Guests (1:N) |
| 347 | | |
| 348 | | Each Guest is associated with one Wedding |
| 349 | | |
| 350 | | === Guest – Event (RSVP) |
| 351 | | |
| 352 | | Guests can RSVP to multiple Events and Events can have multiple RSVPs (M:N) |
| 353 | | |
| 354 | | Event_RSVP stores RSVP status and response date |
| 355 | | |
| 356 | | === Guest – Event (Attendance) |
| 357 | | |
| 358 | | Guests can attend multiple Events and Events can have multiple Attendance records (M:N) |
| 359 | | |
| 360 | | Attendance stores role, seating, and attendance status |
| 361 | | |
| 362 | | === Wedding – Venue_booking – Venue |
| 363 | | |
| 364 | | One Wedding can have multiple Venue_bookings |
| 365 | | |
| 366 | | One Venue can be booked multiple times |
| 367 | | |
| 368 | | Constraint: no overlapping bookings for the same Venue |
| 369 | | |
| 370 | | === Wedding – Band_booking – Band |
| 371 | | |
| 372 | | One Wedding can have multiple Band_bookings |
| 373 | | |
| 374 | | Constraint: no overlapping bookings for the same Band |
| 375 | | |
| 376 | | === Wedding – Photographer_booking – Photographer |
| 377 | | |
| 378 | | One Wedding can have multiple Photographer_bookings |
| 379 | | |
| 380 | | Constraint: no overlapping bookings for the same Photographer |
| 381 | | |
| 382 | | === Wedding – Church |
| 383 | | |
| 384 | | Each Wedding is associated with exactly one Church (1:1) |
| 385 | | |
| 386 | | A Church cannot be assigned to more than one Wedding at the same date and time |
| | 243 | User – Wedding: |
| | 244 | One User can organize multiple Weddings (1:N). Each Wedding belongs to exactly one User. |
| | 245 | |
| | 246 | Wedding – Event: |
| | 247 | One Wedding can have multiple Events (1:N). Each Event belongs to one Wedding. |
| | 248 | |
| | 249 | Wedding – Guest: |
| | 250 | One Wedding can invite multiple Guests (1:N). |
| | 251 | |
| | 252 | Guest – Event (RSVP): |
| | 253 | Guests can RSVP to multiple Events and Events can have multiple RSVPs (M:N). |
| | 254 | |
| | 255 | Guest – Event (Attendance): |
| | 256 | Guests can attend multiple Events and Events can have multiple Attendance records (M:N). |
| | 257 | |
| | 258 | Wedding – Venue_booking – Venue: |
| | 259 | A Wedding can have multiple Venue bookings and a Venue can be booked multiple times. Overlapping bookings for the same venue are not allowed. |
| | 260 | |
| | 261 | Wedding – Band_booking – Band: |
| | 262 | A Wedding can book multiple Bands. Overlapping bookings for the same band are not allowed. |
| | 263 | |
| | 264 | Wedding – Photographer_booking – Photographer: |
| | 265 | A Wedding can book multiple Photographers. Overlapping bookings for the same photographer are not allowed. |
| | 266 | |
| | 267 | Wedding – Church: |
| | 268 | Each Wedding is associated with exactly one Church. A Church cannot be assigned to more than one Wedding at the same date and time. |
| 390 | | v0.1 – Initial ER model |
| 391 | | |
| 392 | | v0.2 – Updated Church–Wedding relationship |
| 393 | | |
| 394 | | v0.3 – Refined Church–Wedding constraints |
| 395 | | |
| 396 | | v0.4 – Fourth version of the ER model with refined Church–Wedding relationship |
| 397 | | |
| 398 | | v0.5 – Final version of the ER model with improved clarity, consistency, and full alignment with the relational database design |
| | 272 | v0.1 – Initial ER model |
| | 273 | v0.2 – Updated Church–Wedding relationship |
| | 274 | v0.3 – Refined Church–Wedding constraints |
| | 275 | v0.4 – Improved clarity and structure |
| | 276 | v0.5 – Final ER model aligned with the relational database design |