0% found this document useful (0 votes)
11 views

Mysql Part

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Mysql Part

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

-‭ - Create the FlightLogger database‬

‭CREATE DATABASE FlightLogger;‬

-‭ - Use the FlightLogger database‬


‭USE FlightLogger;‬

-‭ - Table for storing flight schedule details‬


‭CREATE TABLE flight_schedule (‬
‭flight_id VARCHAR(10) PRIMARY KEY,‬
‭airline VARCHAR(100),‬
‭origin VARCHAR(100),‬
‭destination VARCHAR(100),‬
‭departure_time DATETIME,‬
‭arrival_time DATETIME,‬
‭seats INT,‬
‭ticket_price DECIMAL(10, 2)‬
‭);‬

-‭ - Table for storing booking details‬


‭CREATE TABLE bookings (‬
‭booking_id VARCHAR(6) PRIMARY KEY,‬
‭passenger_name VARCHAR(100),‬
‭flight_id VARCHAR(10),‬
‭seat_number VARCHAR(5),‬
‭age INT,‬
‭email VARCHAR(100),‬
‭phone_number VARCHAR(15),‬
‭passport_id VARCHAR(20),‬
‭FOREIGN KEY (flight_id) REFERENCES flight_schedule(flight_id)‬
‭);‬

You might also like