ATMS
ATMS
Submitted by
Session 2022-2026
Supervised by
ERD Diagram
4
5
SQL QUERIES
Passenger (Customer) Table
Entity: Passenger
Attributes:
• CustomerID (Primary Key)
• Name
• Email
• PhoneNumber
Flight Table
Entity: Flight
Attributes:
• FlightID (Primary Key)
• Destination
• DepartureTime
• Price
Booking Table
Entity: Booking
Attributes:
• BookingID (Primary Key)
• CustomerID (Foreign Key referencing Passenger)
• FlightID (Foreign Key referencing Flight)
• BookingDate
6
Payment Table
Entity: Payment
Attributes:
• PaymentID (Primary Key)
• BookingID (Foreign Key referencing Booking)
• PaymentAmount
• PaymentDate
Queries
1. Create Tables:
INSERT INTO User (user_id, username, email, password, contact_number) VALUES (1,
'john_doe', '[email protected]', 'securepassword', '123-456-7890'), (2, 'jane_smith',
'[email protected]', 'password123', '987-654-3210');