# Airline Booking Data Dictionary
The airline database is designed to efficiently store and manage data related to passengers, flights, bookings, aircraft, airports, users, payments, and rewards programs. Its purpose is to support the operations of an airline, allowing for the tracking of passenger information, flight details, reservations, aircraft configurations, and more. The database utilizes Firebase Firestore as its data store and employs a structured data model with references between collections to establish relationships, ensuring data integrity. Timestamps are used to track date and time information. Passengers can make bookings, earn rewards, and payments can be associated with bookings. Additionally, user authentication is integrated to enable secure access to the system. This organized and comprehensive database structure enables effective data retrieval, storage, and management for airline operations and passenger services.
### Passenger
| Field Name | Data Type | Description |
|-----------------|---------------------|-------------------------------|
| passengerID | String (Document ID)| Primary key identifier |
| firstName | String | First name of the passenger |
| lastName | String | Last name of the passenger |
| dateOfBirth | Timestamp | Date of birth of the passenger|
| email | String | Email address of the passenger|
| phone | String | Phone number of the passenger |
| address | String | Address of the passenger |
| rewardsNumber | String | Rewards program identifier |
### Flight
| Field Name | Data Type | Description |
|-----------------|---------------------|------------------------------------|
| flightNumber | String (Document ID)| Primary key identifier |
| departureAirport| String | Airport code of departure |
| arrivalAirport | String | Airport code of arrival |
| departureDateTime| Timestamp | Date and time of departure |
| arrivalDateTime | Timestamp | Date and time of arrival |
| aircraftType | String | Type or model of the aircraft |
| flightStatus | String | Status of the flight (e.g., On Time, Delayed) |
| mileage | Integer | Mileage or distance of the flight |
### Booking
| Field Name | Data Type | Description |
|-----------------|---------------------|-------------------------------|
| bookingID | String (Document ID)| Primary key identifier |
| passenger | Reference (to Passenger)| Reference to the Passenger who made the booking |
| flight | Reference (to Flight)| Reference to the Flight booked |
| bookingDateTime | Timestamp | Timestamp of the booking |
| seatNumber | String | Seat number for the booking |
| flightClass | String | Class of the booking (First, Business, Main) |
| price | Double | Price of the booking |
| payment | Reference (to Payment)| Reference to Payment (if applicable) |
### Aircraft
| Field Name | Data Type | Description |
|-------------------|---------------------|-------------------------------|
| aircraftID | String (Document ID)| Primary key identifier |
| aircraftType | String | Type or model of the aircraft |
| firstClassSeats | Integer | Number of seats in First Class|
| businessClassSeats| Integer | Number of seats in Business Class|
| mainClassSeats | Integer | Number of seats in Main Class|
### Airport
| Field Name | Data Type | Description |
|-----------------|---------------------|----------------------------|
| airportCode | String (Document ID)| Primary key airport code |
| airportName | String | Name of the airport |
| location | String | Location or city of the airport |
### User
| Field Name | Data Type | Description |
|-----------------|---------------------|-------------------------------|
| userID (Firebase Auth UID)| String | Unique identifier for the user |
| email | String | Email address of the user |
| firstName | String | First name of the user |
| lastName | String | Last name of the user |
| rewardsNumber | String | Rewards program identifier |
### Payment
| Field Name | Data Type | Description |
|-----------------|---------------------|-------------------------------|
| paymentID | String (Document ID)| Primary key identifier |
| paymentDate | Timestamp | Timestamp of the payment |
| amount | Double | Amount paid |
| paymentMethod | String | Payment method used (e.g., Stripe) |
| transactionID | String | Transaction ID from payment gateway (e.g., Stripe) |