Changes between Version 2 and Version 3 of ERModel


Ignore:
Timestamp:
01/02/26 02:43:52 (3 weeks ago)
Author:
193284
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v2 v3  
    44This page contains the ER model description and diagrams for the system.
    55
    6 
    7 
    8 == ** Entity-Relationship Model Wedding_Planner**
    9 
    10 
    11 
     6== **Entity-Relationship Model Wedding_Planner**
    127
    138== **Diagram**
    149[[Image(Wedding_planner_Version.01.png, width=100%)]]
    1510
    16 
    17 
    18 == **Data requirements**
     11== **Data requirements**
    1912
    2013== **Entity: User**
     
    2316The 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.
    2417
    25 
    26 **Candidate keys:**
    27 
     18**Candidate keys:**
    2819user_id – chosen as the primary key because it is a system-generated, stable, and unique identifier.
    29 
    3020email – candidate key because it is unique per user, but not selected as the primary key since it can change.
    3121
    32 
    33 **Attributes:**
    34 
     22**Attributes:**
    3523user_id – numeric, required
    36 
    3724first_name – text, required
    38 
    3925last_name – text, required
    40 
    4126email – text, required, valid email format
    42 
    4327phone_number – text, optional
    44 
    4528gender – text, optional
    46 
    4729birthday – date, optional
    4830
    4931
    50 == Entity: Wedding
     32== **Entity: Wedding**
    5133
    5234Explanation:
    5335The 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.
    5436
    55 
    56 **Candidate keys:**
    57 
     37**Candidate keys:**
    5838wedding_id – chosen as the primary key as a unique system-generated identifier.
    5939
    60 
    61 **Attributes:**
    62 
     40**Attributes:**
    6341wedding_id – numeric, required
    64 
    65 date – date, required
    66 
     42date – date, required
    6743budget – numeric, optional
    68 
    6944notes – text, optional
    7045
     
    7550The 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.
    7651
    77 
    78 **Candidate keys:**
    79 
     52**Candidate keys:**
    8053event_id – chosen as the primary key because it uniquely identifies each event.
    8154
    82 
    83 **Attributes:**
    84 
     55**Attributes:**
    8556event_id – numeric, required
    86 
    8757event_type – text, required
    88 
    89 date – date, required
    90 
    91 start_time – time, required
    92 
    93 end_time – time, required
    94 
     58date – date, required
     59start_time – time, required
     60end_time – time, required
    9561status – text, required
    9662
     
    9965
    10066Explanation:
    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 
     67The 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:**
    10670response_id – chosen as the primary key as it uniquely identifies each RSVP response.
    10771
    108 
    109 **Attributes:**
    110 
     72**Attributes:**
    11173response_id – numeric, required
    112 
    113 status – text, required
    114 
     74status – text, required
    11575response_date – date, required
    11676
     
    12181The Guest entity represents individuals invited to the wedding. It stores guest-specific information independently from registered users, as guests do not need system accounts.
    12282
    123 
    124 **Candidate keys:**
    125 
     83**Candidate keys:**
    12684guest_id – chosen as the primary key.
    12785
    128 
    129 **Attributes:**
    130 
     86**Attributes:**
    13187guest_id – numeric, required
    132 
    13388first_name – text, required
    134 
    13589last_name – text, required
    136 
    13790email – text, optional
    13891
     
    14093== **Entity: Attendance**
    14194
    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 
     95Explanation:
     96The 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:**
    14999attendance_id – chosen as the primary key.
    150100
    151 
    152 **Attributes:**
    153 
     101**Attributes:**
    154102attendance_id – numeric, required
    155 
    156 status – text, required
    157 
    158 table_number – numeric, required
    159 
     103status – text, required
     104table_number – numeric, optional
    160105role – text, required
    161106
    162 total – numeric, required
    163 
    164107
    165108== **Entity: Venue**
     
    168111The Venue entity represents physical locations where wedding events take place. It stores capacity, pricing, and contact details to support venue selection and booking.
    169112
    170 
    171 **Candidate keys:**
    172 
     113**Candidate keys:**
    173114venue_id – chosen as the primary key.
    174115
    175 
    176 **Attributes:**
    177 
     116**Attributes:**
    178117venue_id – numeric, required
    179 
    180118name – text, required
    181 
    182119location – text, required
    183 
    184120city – text, required
    185 
    186121address – text, required
    187 
    188122capacity – numeric, required
    189 
    190123menu – text, optional
    191 
    192124phone_number – text, optional
    193 
    194125price_per_guest – numeric, required
    195126
     
    200131The Venue_Type entity categorizes venues (e.g., restaurant, hall, outdoor space). It is separated to ensure data consistency and easy extensibility.
    201132
    202 
    203 **Candidate keys:**
    204 
     133**Candidate keys:**
    205134type_id – chosen as the primary key.
    206135
    207 
    208 **Attributes:**
    209 
     136**Attributes:**
    210137type_id – numeric, required
    211 
    212138type_name – text, required
    213139
     
    218144The Venue_booking entity represents reservations of venues for weddings. It captures scheduling and pricing information and ensures no booking conflicts occur.
    219145
    220 
    221 **Candidate keys:**
    222 
     146**Candidate keys:**
    223147booking_id – chosen as the primary key.
    224148
    225 
    226 **Attributes:**
    227 
     149**Attributes:**
    228150booking_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 
     151date – date, required
     152start_time – time, required
     153end_time – time, required
     154status – text, required
    238155price – numeric, required
    239156
     
    244161The Photographer entity represents professional photographers available for weddings. It stores contact and pricing information to support booking and comparison.
    245162
    246 
    247 **Candidate keys:**
    248 
     163**Candidate keys:**
    249164photographer_id – chosen as the primary key.
    250165
    251 
    252 **Attributes:**
    253 
     166**Attributes:**
    254167photographer_id – numeric, required
    255 
    256168name – text, required
    257 
    258169email – text, required
    259 
    260170phone_number – text, required
    261 
    262171price_per_hour – numeric, required
    263172
     
    268177This entity records bookings of photographers for specific weddings and time periods.
    269178
    270 
    271 **Candidate keys:**
    272 
     179**Candidate keys:**
    273180booking_id – chosen as the primary key.
    274181
    275 
    276 **Attributes:**
    277 
     182**Attributes:**
    278183booking_id – numeric, required
    279 
    280 date – date, required
    281 
    282 start_time – time, required
    283 
    284 end_time – time, required
    285 
     184date – date, required
     185start_time – time, required
     186end_time – time, required
    286187status – text, required
    287188
     
    292193The Band entity represents music performers available for weddings. It allows storage of genre, equipment, and pricing information.
    293194
    294 
    295 **Candidate keys:**
    296 
     195**Candidate keys:**
    297196band_id – chosen as the primary key.
    298197
    299 
    300 **Attributes:**
    301 
     198**Attributes:**
    302199band_id – numeric, required
    303 
    304200band_name – text, required
    305 
    306201genre – text, required
    307 
    308202equipment – text, optional
    309 
    310203phone_number – text, required
    311 
    312204price_per_hour – numeric, required
    313205
    314206
    315 == **Entity: Band_booking
     207== **Entity: Band_booking**
    316208
    317209Explanation:
    318210The Band_booking entity represents reservations of bands for weddings, including timing and booking status.
    319211
    320 
    321 **Candidate keys:**
    322 
     212**Candidate keys:**
    323213booking_id – chosen as the primary key.
    324214
    325 
    326 **Attributes:**
    327 
     215**Attributes:**
    328216booking_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 
     217date – date, required
     218start_time – time, required
     219end_time – time, required
     220status – text, required
    338221
    339222
     
    343226The Church entity represents religious locations where wedding ceremonies can take place.
    344227
    345 
    346 **Candidate keys:**
    347 
     228**Candidate keys:**
    348229church_id – chosen as the primary key.
    349230
    350 
    351 **Attributes:**
    352 
     231**Attributes:**
    353232church_id – numeric, required
    354 
    355233name – text, required
    356 
    357234location – text, required
    358 
    359235contact – text, required
    360236
     
    365241The Church_booking entity records church reservations for wedding ceremonies.
    366242
    367 
    368 **Candidate keys:**
    369 
     243**Candidate keys:**
    370244booking_id – chosen as the primary key.
    371245
    372 
    373 **Attributes:**
    374 
     246**Attributes:**
    375247booking_id – numeric, required
    376 
    377 date – date, required
    378 
    379 start_time – time, required
    380 
    381 end_time – time, required
    382 
     248date – date, required
     249start_time – time, required
     250end_time – time, required
    383251status – text, required
    384252
     
    389257The Priest entity represents clergy members who perform wedding ceremonies. It is modeled separately to allow assignment to church ceremonies.
    390258
    391 
    392 **Candidate keys:**
    393 
     259**Candidate keys:**
    394260priest_id – chosen as the primary key.
    395261
    396 
    397 **Attributes:**
    398 
     262**Attributes:**
    399263priest_id – numeric, required
    400 
    401264name – text, required
    402 
    403265contact – text, required
    404266
    405267
     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
    406311
    407312== **Entity-Relationship Model History**
    408 
    409313*.01 – Initial version of the ER model