Changes between Version 3 and Version 4 of P3


Ignore:
Timestamp:
01/03/26 15:21:04 (2 weeks ago)
Author:
193284
Comment:

P3 completed – Added full SQL use cases and UX/UI flow aligned with the ER model.

Legend:

Unmodified
Added
Removed
Modified
  • P3

    v3 v4  
    33== Description
    44This phase demonstrates typical application scenarios for accessing the Wedding Planner database using SQL queries.
    5 The scenarios reflect real tasks such as creating weddings, managing events and guests, tracking attendance, and handling venue bookings.
     5The scenarios reflect real tasks such as creating weddings, managing events and guests, tracking attendance, and handling bookings of wedding services.
    66
    77== Assumptions
    8  * Primary keys are generated by the system (or assigned manually for the examples).
     8 * Primary keys are generated by the system (or assigned manually for demonstration purposes).
    99 * table_number in Attendance is optional because not all events require seating arrangements.
    1010 * Status values are stored as text (e.g., 'planned', 'confirmed', 'cancelled', 'attending').
     11 * If the DBMS treats USER as a reserved keyword, the table name can be quoted (e.g., "User") or renamed to Users.
    1112
    1213== Scenario 1: Register a new user
     
    4849
    4950== Scenario 5: Record attendance for an event
    50 Track guest attendance for a specific event (e.g., reception). table_number is optional.
     51Track guest attendance for a specific event. table_number is optional.
    5152
    5253{{{
     
    8889}}}
    8990
    90 == Scenario 9: Attendance overview for an event (JOIN)
    91 List guests with their attendance status and seating (if available) for a specific event.
     91== Scenario 9: Attendance overview for an event
     92List guests with their attendance status and seating information.
    9293
    9394{{{
     
    100101
    101102== Scenario 10: Update an event status
    102 Example: the ceremony is confirmed.
     103Confirm a wedding event.
    103104
    104105{{{
     
    109110
    110111== Scenario 11: Add venue types and venues
    111 Define venue types and store available venues.
     112Define venue categories and store available venues.
    112113
    113114{{{
     
    120121
    121122{{{
    122 INSERT INTO Venue (venue_id, name, location, city, address, capacity, menu, phone_number, price_per_guest)
    123 VALUES
    124 (1, 'Royal Hall', 'Center', 'Skopje', 'Main Street 10', 250, 'Standard Menu', '021234567', 25.00),
    125 (2, 'Lakeview Hotel', 'Lake Area', 'Ohrid', 'Lake Road 5', 180, NULL, '046111222', 30.00);
    126 }}}
    127 
    128 == Scenario 12: Book a venue for a wedding (Venue_booking)
    129 Create a booking record for a specific venue and time interval.
     123INSERT INTO Venue (venue_id, name, location, city, address, capacity, menu, phone_number, price_per_guest, type_id)
     124VALUES
     125(1, 'Royal Hall', 'Center', 'Skopje', 'Main Street 10', 250, 'Standard Menu', '021234567', 25.00, 3),
     126(2, 'Lakeview Hotel', 'Lake Area', 'Ohrid', 'Lake Road 5', 180, NULL, '046111222', 30.00, 2);
     127}}}
     128
     129== Scenario 12: Book a venue for a wedding
     130Create a venue booking for a specific time interval.
    130131
    131132{{{
     
    134135}}}
    135136
    136 == Scenario 13: Venue booking overview for a wedding (JOIN)
    137 Show booking details including venue name.
     137== Scenario 13: Venue booking overview for a wedding
     138Show venue booking details including venue name.
    138139
    139140{{{
     
    145146}}}
    146147
    147 == Scenario 14: Count guests per wedding (aggregate query)
    148 Useful for planning and estimating costs.
     148== Scenario 14: Count guests per wedding
     149Aggregate query useful for planning.
    149150
    150151{{{
     
    152153FROM Wedding w
    153154LEFT JOIN Guest g ON w.wedding_id = g.wedding_id
    154 GROUP BY w.wedding_id
    155 ORDER BY w.wedding_id;
     155GROUP BY w.wedding_id;
    156156}}}
    157157
    158158== Scenario 15: Estimated venue cost based on guest count
    159 Estimate total cost = price_per_guest * number_of_guests (for a selected venue and wedding).
     159Estimate total cost using price per guest.
    160160
    161161{{{
     
    172172}}}
    173173
     174== Scenario 16: RSVP for an event
     175Store guest responses to event invitations.
     176
     177{{{
     178INSERT INTO Event_RSVP (response_id, status, response_date, guest_id, event_id)
     179VALUES
     180(1, 'confirmed', '2026-05-01', 101, 1),
     181(2, 'declined', '2026-05-02', 103, 1);
     182}}}
     183
     184== Scenario 17: Add a band and book it for a wedding
     185Register a band and create a booking.
     186
     187{{{
     188INSERT INTO Band (band_id, band_name, genre, equipment, phone_number, price_per_hour)
     189VALUES (1, 'Midnight Groove', 'Pop', 'Full set', '071999888', 120.00);
     190}}}
     191
     192{{{
     193INSERT INTO Band_booking (booking_id, date, start_time, end_time, status, wedding_id, band_id)
     194VALUES (1, '2026-06-20', '18:00:00', '22:00:00', 'confirmed', 1, 1);
     195}}}
     196
     197== Scenario 18: Add a photographer and book them
     198Store photographer data and booking.
     199
     200{{{
     201INSERT INTO Photographer (photographer_id, name, email, phone_number, price_per_hour)
     202VALUES (1, 'Studio Lens', 'lens@mail.com', '072333444', 80.00);
     203}}}
     204
     205{{{
     206INSERT INTO Photographer_booking (booking_id, date, start_time, end_time, status, wedding_id, photographer_id)
     207VALUES (1, '2026-06-20', '11:00:00', '16:00:00', 'confirmed', 1, 1);
     208}}}
     209
     210== Scenario 19: Add a church and book a ceremony slot
     211Insert church data and reserve a time slot.
     212
     213{{{
     214INSERT INTO Church (church_id, name, location, contact)
     215VALUES (1, 'St. Clement', 'Skopje', '02-555-111');
     216}}}
     217
     218{{{
     219INSERT INTO Church_booking (booking_id, date, start_time, end_time, status, wedding_id, church_id)
     220VALUES (1, '2026-06-20', '12:00:00', '13:00:00', 'confirmed', 1, 1);
     221}}}
     222
     223== Scenario 20: Add a registrar and book an appointment
     224Insert registrar information and create a booking.
     225
     226{{{
     227INSERT INTO Registrar (registrar_id, name, contact, location, working_hours)
     228VALUES (1, 'City Registrar Office', '02-444-222', 'Skopje Center', 'Mon-Fri 08:00-16:00');
     229}}}
     230
     231{{{
     232INSERT INTO Registrar_booking (booking_id, date, start_time, end_time, status, price, wedding_id, registrar_id)
     233VALUES (1, '2026-06-18', '10:00:00', '10:30:00', 'confirmed', 30.00, 1, 1);
     234}}}
     235
     236== Scenario 21: Check availability before booking
     237Verify that a resource is available and prevent overlapping bookings.
     238
     239{{{
     240SELECT *
     241FROM Venue_booking vb
     242WHERE vb.venue_id = 1
     243  AND vb.date = '2026-06-20'
     244  AND NOT (vb.end_time <= '15:00:00' OR vb.start_time >= '21:00:00');
     245}}}
     246
    174247== Conclusion
    175 These SQL scenarios demonstrate how the database supports the main wedding planning operations:
    176 user and wedding management, event scheduling, guest tracking, attendance recording, and venue bookings.
    177 
    178 
     248These scenarios demonstrate how the database supports complete wedding planning operations,
     249including user management, event scheduling, guest tracking, service bookings, and availability control.
    179250
    180251
    181252== UX/UI Development Plan ==
    182253
    183 This section is intended to guide UX/UI designers on the sequence and contents of the web pages
    184 based on the current database design and application scenarios.
     254This section guides the UX/UI designers on the structure, order, and responsibilities
     255of the application pages based on the database design and SQL scenarios defined in P3.
    185256
    186257=== General Guidelines ===
    187258* The UI should follow the database structure and SQL use cases listed in P3.
    188 * Each major user interaction (e.g., creating a wedding, adding guests, booking venues) should
    189   correspond to a logical group of SQL queries and entities in the database.
    190 * Screens should be organized to match the real-world process flow: login → wedding creation →
    191   event creation → guest management → attendance tracking → bookings → summaries/reports.
     259* Each major user interaction corresponds directly to one or more database entities
     260  and SQL operations.
     261* Screens are organized according to the real-world wedding planning workflow:
     262  login → wedding creation → event setup → guest management → bookings → summaries.
    192263
    193264=== Suggested Page Flow ===
     265
    1942661. **User Login / Registration Page**
    195    - Capture user credentials (User entity).
    196    - Link to Wedding creation/dashboard once logged in.
     267   - User authentication and account creation.
     268   - Based on the User entity.
     269   - Successful login redirects to the Wedding Dashboard.
    197270
    1982712. **Wedding Dashboard**
    199    - List all weddings for the user.
    200    - Options to create/edit/delete wedding records (Wedding entity).
    201 
    202 3. **Event Management**
    203    - Page for adding, editing, and viewing events for selected wedding.
    204    - Connects to Event entity.
    205 
    206 4. **Guest List and Attendance**
    207    - Page to add/edit guest details (Guest entity).
    208    - Multi-select or event-specific attendance (Attendance entity).
    209    - Optional table assignment if applicable.
     272   - Displays all weddings managed by the logged-in user.
     273   - Create, view, edit, or delete weddings.
     274   - Based on the Wedding entity.
     275
     2763. **Event Management Page**
     277   - Add, edit, and view events (ceremony, reception, party).
     278   - Event date, time, and status management.
     279   - Based on the Event entity.
     280
     2814. **Guest List and Attendance Page**
     282   - Add and manage wedding guests.
     283   - Assign attendance status, roles, and optional table numbers per event.
     284   - Based on Guest and Attendance entities.
    210285
    2112865. **Bookings Page**
    212    - Separate sections for:
    213      * Venue booking (Venue & Venue_booking entities)
    214      * Photographer booking (Photographer & Photographer_booking)
    215      * Other service bookings
    216    - Include date/time pickers and status fields.
     287   - Central page for managing all service bookings.
     288   - Organized into separate tabs or sections for clarity:
     289
     290     * **Venue Bookings**
     291       - Select venue, date, time, and status.
     292       - Based on Venue and Venue_booking entities.
     293
     294     * **Church Bookings**
     295       - Select church and ceremony time slot.
     296       - Based on Church and Church_booking entities.
     297
     298     * **Registrar Bookings**
     299       - Book registrar appointments with optional fee.
     300       - Based on Registrar and Registrar_booking entities.
     301
     302     * **Band Bookings**
     303       - Select music band and performance time.
     304       - Based on Band and Band_booking entities.
     305
     306     * **Photographer Bookings**
     307       - Book photographer services for selected time intervals.
     308       - Based on Photographer and Photographer_booking entities.
    217309
    2183106. **Reports / Summary Pages**
    219    - Show aggregated data such as guest count, attendance status,
    220      booked services overview, and cost estimates.
     311   - Aggregated and overview information for the wedding:
     312     * Guest count
     313     * Attendance status
     314     * Booked services
     315     * Estimated costs
     316   - Uses aggregate SQL queries from P3.
     317
     318=== Service Providers Page (Optional but Recommended)
     319* Dedicated page for browsing and searching service providers:
     320  - Venues
     321  - Bands
     322  - Photographers
     323  - Churches
     324  - Registrars
     325* Allows filtering and selection before creating bookings.
     326* Improves usability and separation of concerns in the UI.
    221327
    222328=== Interaction-to-SQL Mapping ===
    223 * For each user action, refer to specific SQL scenarios in P3:
    224   - Wedding creation → `INSERT INTO Wedding`
    225   - Adding guest → `INSERT INTO Guest`
    226   - Recording attendance → `INSERT INTO Attendance`
    227   - List events → `SELECT FROM Event WHERE wedding_id = ?`
    228   - Booking venue → `INSERT INTO Venue_booking`
    229   - etc.
     329* Wedding creation → `INSERT INTO Wedding`
     330* Event creation → `INSERT INTO Event`
     331* Guest management → `INSERT INTO Guest`
     332* Attendance tracking → `INSERT INTO Attendance`
     333* Venue booking → `INSERT INTO Venue_booking`
     334* Church booking → `INSERT INTO Church_booking`
     335* Registrar booking → `INSERT INTO Registrar_booking`
     336* Band booking → `INSERT INTO Band_booking`
     337* Photographer booking → `INSERT INTO Photographer_booking`
     338* Availability checks → `SELECT ... WHERE NOT overlapping`
    230339
    231340=== Design Notes ===
    232 * Use consistent navigation (e.g., top bar with links: Weddings | Events | Guests | Bookings).
    233 * Forms should validate required fields before submission (e.g., wedding date, event time).
    234 * Views for lists should support sorting/filtering/search (e.g., guests by name).
     341* Navigation should be consistent across all pages.
     342* Booking forms must validate date/time availability before submission.
     343* Required fields should be validated on the client side before SQL execution.
     344* Lists should support sorting, filtering, and searching.
    235345
    236346== UX/UI Pages Checklist ==
     
    238348* Wedding Dashboard
    239349* Event Management
    240 * Guest List + Attendance
    241 * Venue & Services Booking
     350* Guest List & Attendance
     351* Bookings (Venue, Church, Registrar, Band, Photographer)
     352* Service Providers (list/search)
    242353* Reports / Summary
    243 
    244