Changes between Version 3 and Version 4 of P3
- Timestamp:
- 01/03/26 15:21:04 (2 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
P3
v3 v4 3 3 == Description 4 4 This 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.5 The scenarios reflect real tasks such as creating weddings, managing events and guests, tracking attendance, and handling bookings of wedding services. 6 6 7 7 == 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). 9 9 * table_number in Attendance is optional because not all events require seating arrangements. 10 10 * 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. 11 12 12 13 == Scenario 1: Register a new user … … 48 49 49 50 == Scenario 5: Record attendance for an event 50 Track guest attendance for a specific event (e.g., reception). table_number is optional.51 Track guest attendance for a specific event. table_number is optional. 51 52 52 53 {{{ … … 88 89 }}} 89 90 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 92 List guests with their attendance status and seating information. 92 93 93 94 {{{ … … 100 101 101 102 == Scenario 10: Update an event status 102 Example: the ceremony is confirmed.103 Confirm a wedding event. 103 104 104 105 {{{ … … 109 110 110 111 == Scenario 11: Add venue types and venues 111 Define venue types and store available venues.112 Define venue categories and store available venues. 112 113 113 114 {{{ … … 120 121 121 122 {{{ 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 andtime interval.123 INSERT INTO Venue (venue_id, name, location, city, address, capacity, menu, phone_number, price_per_guest, type_id) 124 VALUES 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 130 Create a venue booking for a specific time interval. 130 131 131 132 {{{ … … 134 135 }}} 135 136 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 138 Show venue booking details including venue name. 138 139 139 140 {{{ … … 145 146 }}} 146 147 147 == Scenario 14: Count guests per wedding (aggregate query)148 Useful for planning and estimating costs.148 == Scenario 14: Count guests per wedding 149 Aggregate query useful for planning. 149 150 150 151 {{{ … … 152 153 FROM Wedding w 153 154 LEFT JOIN Guest g ON w.wedding_id = g.wedding_id 154 GROUP BY w.wedding_id 155 ORDER BY w.wedding_id; 155 GROUP BY w.wedding_id; 156 156 }}} 157 157 158 158 == 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).159 Estimate total cost using price per guest. 160 160 161 161 {{{ … … 172 172 }}} 173 173 174 == Scenario 16: RSVP for an event 175 Store guest responses to event invitations. 176 177 {{{ 178 INSERT INTO Event_RSVP (response_id, status, response_date, guest_id, event_id) 179 VALUES 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 185 Register a band and create a booking. 186 187 {{{ 188 INSERT INTO Band (band_id, band_name, genre, equipment, phone_number, price_per_hour) 189 VALUES (1, 'Midnight Groove', 'Pop', 'Full set', '071999888', 120.00); 190 }}} 191 192 {{{ 193 INSERT INTO Band_booking (booking_id, date, start_time, end_time, status, wedding_id, band_id) 194 VALUES (1, '2026-06-20', '18:00:00', '22:00:00', 'confirmed', 1, 1); 195 }}} 196 197 == Scenario 18: Add a photographer and book them 198 Store photographer data and booking. 199 200 {{{ 201 INSERT INTO Photographer (photographer_id, name, email, phone_number, price_per_hour) 202 VALUES (1, 'Studio Lens', 'lens@mail.com', '072333444', 80.00); 203 }}} 204 205 {{{ 206 INSERT INTO Photographer_booking (booking_id, date, start_time, end_time, status, wedding_id, photographer_id) 207 VALUES (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 211 Insert church data and reserve a time slot. 212 213 {{{ 214 INSERT INTO Church (church_id, name, location, contact) 215 VALUES (1, 'St. Clement', 'Skopje', '02-555-111'); 216 }}} 217 218 {{{ 219 INSERT INTO Church_booking (booking_id, date, start_time, end_time, status, wedding_id, church_id) 220 VALUES (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 224 Insert registrar information and create a booking. 225 226 {{{ 227 INSERT INTO Registrar (registrar_id, name, contact, location, working_hours) 228 VALUES (1, 'City Registrar Office', '02-444-222', 'Skopje Center', 'Mon-Fri 08:00-16:00'); 229 }}} 230 231 {{{ 232 INSERT INTO Registrar_booking (booking_id, date, start_time, end_time, status, price, wedding_id, registrar_id) 233 VALUES (1, '2026-06-18', '10:00:00', '10:30:00', 'confirmed', 30.00, 1, 1); 234 }}} 235 236 == Scenario 21: Check availability before booking 237 Verify that a resource is available and prevent overlapping bookings. 238 239 {{{ 240 SELECT * 241 FROM Venue_booking vb 242 WHERE 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 174 247 == 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 248 These scenarios demonstrate how the database supports complete wedding planning operations, 249 including user management, event scheduling, guest tracking, service bookings, and availability control. 179 250 180 251 181 252 == UX/UI Development Plan == 182 253 183 This section is intended to guide UX/UI designers on the sequence and contents of the web pages184 based on the current database design and application scenarios.254 This section guides the UX/UI designers on the structure, order, and responsibilities 255 of the application pages based on the database design and SQL scenarios defined in P3. 185 256 186 257 === General Guidelines === 187 258 * 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) should189 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. 192 263 193 264 === Suggested Page Flow === 265 194 266 1. **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. 197 270 198 271 2. **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 276 3. **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 281 4. **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. 210 285 211 286 5. **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. 217 309 218 310 6. **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. 221 327 222 328 === 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` 230 339 231 340 === 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. 235 345 236 346 == UX/UI Pages Checklist == … … 238 348 * Wedding Dashboard 239 349 * 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) 242 353 * Reports / Summary 243 244
