Detailed Component Design
Reservation Management
- How to create a new reservation?
- Ask the user for some considerations, such as experience in navigating a parking spot, accessibility considerations, vehicle type/size considerations, time/date
- Then retrieve all parking spots matching such criteria considering also the parking lot segment
- Retrieve all future reservations for such parking spots
- reserve the first available parking spot matching all conditions and having no reservation in the requested time/date
- Select the first parking spotA new reservation is done by inserting a new record in the table `reservations`
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.