The database is designed to manage various aspects of a parking lot, including:
Owners: Information about vehicle owners.
Vehicles: Details of vehicles, linked to owners.
ElectricVehicleCharging: Records of electric vehicle charging sessions.
ParkingLot: Information about different parking lots, including capacity and number of floors.
ParkingSpace: Details of individual parking spaces within each lot.
Staff: Information about parking lot staff, their roles, and assigned lots.
Reservation: Records of parking space reservations.
Payment: Payment details for reservations.
Comprehensive Data Model: Covers all essential entities for a parking lot system.
•
Referential Integrity: Uses foreign keys with ON DELETE SET NULL, ON DELETE CASCADE, and ON UPDATE CASCADE to maintain data consistency.
•
Data Validation: Includes CHECK constraints for capacity, number of floors, and staff salaries.
•
Sample Data: Populated with example data for testing and demonstration.
•
CRUD Operations: Contains INSERT, UPDATE, and DELETE statements.
•
Query Examples: Demonstrates various SELECT queries, including JOIN operations (INNER, LEFT), aggregate functions (COUNT), and nested queries.
•
Views: Defines several views for simplified data access, such as ActiveReservations, TotalPayments, OwnerDetails, VehicleDetails, and ChargingDetails.