= UseCase003 Implementation - Venue availability check = == Initiating actor == User / Wedding organizer == Other actors == Venue manager (optional) == Goal == Check if a venue is available for the selected date/time and prevent double-booking conflicts. == Scenario == === Step 1: User opens availability check === The user selects a venue and chooses the desired date/time. [[Image(venue availability - free.png, width=900)]] SQL: {{{ SELECT v.venue_id, v.name FROM venue v; }}} === Step 2: System checks availability === The system checks if there is an existing reservation for the selected time range. SQL: {{{ SELECT b.booking_id, b.venue_id, b.start_time, b.end_time FROM venue_booking b WHERE b.venue_id = :venueId AND b.start_time < :selectedEnd AND b.end_time > :selectedStart; }}} === Step 3: Result === If no rows are returned -> venue is available. If rows exist -> conflict detected and booking is not allowed. [[Image(venue availability - conflict.png, width=900)]] == Demo data == Venue: (example name) Date: (example date) Time: (example time)