Changes between Version 2 and Version 3 of ERModel
- Timestamp:
- 01/02/26 02:43:52 (3 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERModel
v2 v3 4 4 This page contains the ER model description and diagrams for the system. 5 5 6 7 8 == ** Entity-Relationship Model Wedding_Planner** 9 10 11 6 == **Entity-Relationship Model Wedding_Planner** 12 7 13 8 == **Diagram** 14 9 [[Image(Wedding_planner_Version.01.png, width=100%)]] 15 10 16 17 18 == **Data requirements** 11 == **Data requirements** 19 12 20 13 == **Entity: User** … … 23 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 serves as the main actor that creates weddings, organizes events, and interacts with guests and service providers. The entity is modeled separately to centralize user data and enable secure identification and ownership of weddings. 24 17 25 26 **Candidate keys:** 27 18 **Candidate keys:** 28 19 user_id – chosen as the primary key because it is a system-generated, stable, and unique identifier. 29 30 20 email – candidate key because it is unique per user, but not selected as the primary key since it can change. 31 21 32 33 **Attributes:** 34 22 **Attributes:** 35 23 user_id – numeric, required 36 37 24 first_name – text, required 38 39 25 last_name – text, required 40 41 26 email – text, required, valid email format 42 43 27 phone_number – text, optional 44 45 28 gender – text, optional 46 47 29 birthday – date, optional 48 30 49 31 50 == Entity: Wedding32 == **Entity: Wedding** 51 33 52 34 Explanation: 53 35 The Wedding entity represents a specific wedding event being planned and managed in the system. It acts as the central entity that connects all reservations, services, guests, and events related to a wedding. It is modeled as a separate entity to clearly group all wedding-related data and enable independent management of multiple weddings by different users. 54 36 55 56 **Candidate keys:** 57 37 **Candidate keys:** 58 38 wedding_id – chosen as the primary key as a unique system-generated identifier. 59 39 60 61 **Attributes:** 62 40 **Attributes:** 63 41 wedding_id – numeric, required 64 65 date – date, required 66 42 date – date, required 67 43 budget – numeric, optional 68 69 44 notes – text, optional 70 45 … … 75 50 The Event entity represents individual events related to a wedding, such as ceremonies, receptions, or parties. It allows the system to track schedules, types, and statuses of events. Modeling events separately enables flexibility in planning multiple events for a single wedding. 76 51 77 78 **Candidate keys:** 79 52 **Candidate keys:** 80 53 event_id – chosen as the primary key because it uniquely identifies each event. 81 54 82 83 **Attributes:** 84 55 **Attributes:** 85 56 event_id – numeric, required 86 87 57 event_type – text, required 88 89 date – date, required 90 91 start_time – time, required 92 93 end_time – time, required 94 58 date – date, required 59 start_time – time, required 60 end_time – time, required 95 61 status – text, required 96 62 … … 99 65 100 66 Explanation: 101 The Event_RSVP entity records responses of users or guests to event invitations. It is necessary to track attendance confirmations and response statuses for proper event organization. 102 103 104 **Candidate keys:** 105 67 The Event_RSVP entity records responses of guests to event invitations. It is necessary to track attendance confirmations and response statuses for proper event organization. 68 69 **Candidate keys:** 106 70 response_id – chosen as the primary key as it uniquely identifies each RSVP response. 107 71 108 109 **Attributes:** 110 72 **Attributes:** 111 73 response_id – numeric, required 112 113 status – text, required 114 74 status – text, required 115 75 response_date – date, required 116 76 … … 121 81 The Guest entity represents individuals invited to the wedding. It stores guest-specific information independently from registered users, as guests do not need system accounts. 122 82 123 124 **Candidate keys:** 125 83 **Candidate keys:** 126 84 guest_id – chosen as the primary key. 127 85 128 129 **Attributes:** 130 86 **Attributes:** 131 87 guest_id – numeric, required 132 133 88 first_name – text, required 134 135 89 last_name – text, required 136 137 90 email – text, optional 138 91 … … 140 93 == **Entity: Attendance** 141 94 142 143 Explanation: 144 The Attendance entity represents the participation of guests in wedding events. It enables tracking seating, roles, and attendance status. 145 146 147 **Candidate keys:** 148 95 Explanation: 96 The Attendance entity represents the participation of guests in wedding events. It is used to track whether a guest will attend a specific event, and (when applicable) their seating assignment and role during that event. Seating information is optional because not all events require tables (e.g., church ceremony or civil registration). 97 98 **Candidate keys:** 149 99 attendance_id – chosen as the primary key. 150 100 151 152 **Attributes:** 153 101 **Attributes:** 154 102 attendance_id – numeric, required 155 156 status – text, required 157 158 table_number – numeric, required 159 103 status – text, required 104 table_number – numeric, optional 160 105 role – text, required 161 106 162 total – numeric, required163 164 107 165 108 == **Entity: Venue** … … 168 111 The Venue entity represents physical locations where wedding events take place. It stores capacity, pricing, and contact details to support venue selection and booking. 169 112 170 171 **Candidate keys:** 172 113 **Candidate keys:** 173 114 venue_id – chosen as the primary key. 174 115 175 176 **Attributes:** 177 116 **Attributes:** 178 117 venue_id – numeric, required 179 180 118 name – text, required 181 182 119 location – text, required 183 184 120 city – text, required 185 186 121 address – text, required 187 188 122 capacity – numeric, required 189 190 123 menu – text, optional 191 192 124 phone_number – text, optional 193 194 125 price_per_guest – numeric, required 195 126 … … 200 131 The Venue_Type entity categorizes venues (e.g., restaurant, hall, outdoor space). It is separated to ensure data consistency and easy extensibility. 201 132 202 203 **Candidate keys:** 204 133 **Candidate keys:** 205 134 type_id – chosen as the primary key. 206 135 207 208 **Attributes:** 209 136 **Attributes:** 210 137 type_id – numeric, required 211 212 138 type_name – text, required 213 139 … … 218 144 The Venue_booking entity represents reservations of venues for weddings. It captures scheduling and pricing information and ensures no booking conflicts occur. 219 145 220 221 **Candidate keys:** 222 146 **Candidate keys:** 223 147 booking_id – chosen as the primary key. 224 148 225 226 **Attributes:** 227 149 **Attributes:** 228 150 booking_id – numeric, required 229 230 date – date, required 231 232 start_time – time, required 233 234 end_time – time, required 235 236 status – text, required 237 151 date – date, required 152 start_time – time, required 153 end_time – time, required 154 status – text, required 238 155 price – numeric, required 239 156 … … 244 161 The Photographer entity represents professional photographers available for weddings. It stores contact and pricing information to support booking and comparison. 245 162 246 247 **Candidate keys:** 248 163 **Candidate keys:** 249 164 photographer_id – chosen as the primary key. 250 165 251 252 **Attributes:** 253 166 **Attributes:** 254 167 photographer_id – numeric, required 255 256 168 name – text, required 257 258 169 email – text, required 259 260 170 phone_number – text, required 261 262 171 price_per_hour – numeric, required 263 172 … … 268 177 This entity records bookings of photographers for specific weddings and time periods. 269 178 270 271 **Candidate keys:** 272 179 **Candidate keys:** 273 180 booking_id – chosen as the primary key. 274 181 275 276 **Attributes:** 277 182 **Attributes:** 278 183 booking_id – numeric, required 279 280 date – date, required 281 282 start_time – time, required 283 284 end_time – time, required 285 184 date – date, required 185 start_time – time, required 186 end_time – time, required 286 187 status – text, required 287 188 … … 292 193 The Band entity represents music performers available for weddings. It allows storage of genre, equipment, and pricing information. 293 194 294 295 **Candidate keys:** 296 195 **Candidate keys:** 297 196 band_id – chosen as the primary key. 298 197 299 300 **Attributes:** 301 198 **Attributes:** 302 199 band_id – numeric, required 303 304 200 band_name – text, required 305 306 201 genre – text, required 307 308 202 equipment – text, optional 309 310 203 phone_number – text, required 311 312 204 price_per_hour – numeric, required 313 205 314 206 315 == **Entity: Band_booking 207 == **Entity: Band_booking** 316 208 317 209 Explanation: 318 210 The Band_booking entity represents reservations of bands for weddings, including timing and booking status. 319 211 320 321 **Candidate keys:** 322 212 **Candidate keys:** 323 213 booking_id – chosen as the primary key. 324 214 325 326 **Attributes:** 327 215 **Attributes:** 328 216 booking_id – numeric, required 329 330 date – date, required 331 332 start_time – time, required 333 334 end_time – time, required 335 336 status – text, required 337 217 date – date, required 218 start_time – time, required 219 end_time – time, required 220 status – text, required 338 221 339 222 … … 343 226 The Church entity represents religious locations where wedding ceremonies can take place. 344 227 345 346 **Candidate keys:** 347 228 **Candidate keys:** 348 229 church_id – chosen as the primary key. 349 230 350 351 **Attributes:** 352 231 **Attributes:** 353 232 church_id – numeric, required 354 355 233 name – text, required 356 357 234 location – text, required 358 359 235 contact – text, required 360 236 … … 365 241 The Church_booking entity records church reservations for wedding ceremonies. 366 242 367 368 **Candidate keys:** 369 243 **Candidate keys:** 370 244 booking_id – chosen as the primary key. 371 245 372 373 **Attributes:** 374 246 **Attributes:** 375 247 booking_id – numeric, required 376 377 date – date, required 378 379 start_time – time, required 380 381 end_time – time, required 382 248 date – date, required 249 start_time – time, required 250 end_time – time, required 383 251 status – text, required 384 252 … … 389 257 The Priest entity represents clergy members who perform wedding ceremonies. It is modeled separately to allow assignment to church ceremonies. 390 258 391 392 **Candidate keys:** 393 259 **Candidate keys:** 394 260 priest_id – chosen as the primary key. 395 261 396 397 **Attributes:** 398 262 **Attributes:** 399 263 priest_id – numeric, required 400 401 264 name – text, required 402 403 265 contact – text, required 404 266 405 267 268 == Relationships and Constraints 269 270 === User – Wedding 271 * One User can create/manage many Weddings (1:N). 272 * Each Wedding belongs to exactly one User (mandatory). 273 274 === Wedding – Event 275 * One Wedding has many Events (1:N). 276 * Each Event belongs to exactly one Wedding (mandatory). 277 278 === Wedding – Guest 279 * One Wedding invites many Guests (1:N) (or M:N if a guest can be reused across multiple weddings). 280 * Each Guest is linked to one Wedding (if guests are not reused). 281 282 === Guest – Event (RSVP) 283 * Guest can RSVP to many Events and each Event can have many RSVPs (M:N). 284 * Event_RSVP is the associative entity that stores: status, response_date. 285 286 === Guest – Event (Attendance) 287 * Guest can attend many Events and each Event has many Attendance records (M:N). 288 * Attendance stores per-event guest details: role, table_number (optional), status. 289 290 === Wedding – Venue_booking – Venue 291 * One Wedding can have many Venue_bookings (1:N). 292 * One Venue can be booked many times (1:N). 293 * Venue_booking resolves M:N between Wedding and Venue and stores date/time/status/price. 294 * Constraint: a Venue cannot be booked in overlapping time intervals. 295 296 === Wedding – Band_booking – Band 297 * One Wedding can have many Band_bookings (1:N). 298 * One Band can be booked many times (1:N). 299 * Constraint: no overlapping bookings for the same Band. 300 301 === Wedding – Photographer_booking – Photographer 302 * One Wedding can have many Photographer_bookings (1:N). 303 * One Photographer can be booked many times (1:N). 304 * Constraint: no overlapping bookings for the same Photographer. 305 306 === Wedding – Church_booking – Church 307 * One Wedding can have many Church_bookings (1:N). 308 * One Church can be booked many times (1:N). 309 * Constraint: no overlapping bookings for the same Church. 310 406 311 407 312 == **Entity-Relationship Model History** 408 409 313 *.01 – Initial version of the ER model
