Airline Ticket Reservation is a sample web application which could be use to search flights based on the specified airports (departure airport, arrival airport) and dates (departure date and return date).
2) References:
- For basic DB preparations please refer to notes titled "Installation and Testing of Hypersonic DB"
- For basic Java EE setup for Airline Ticket Reservation Project refer to notes titled "Build and Deployment of Java EE Web Application (Airline Ticket Reservation)"
3) Database Preparations:
Create 2 tables as shown below:
i) Table to store Sector information as described below
CREATE TABLE SECTOR (
DEPARTURE_AP VARCHAR(100),
ARRIVAL_AP VARCHAR(100),
DEPARTURE_DT DATE,
ARRIVAL_DT DATE,
DEPARTURE_TM DECIMAL(4,2),
ARRIVAL_TM DECIMAL(4,2) ,
SID INTEGER,
PID INTEGER,
PRIMARY KEY (SID)
)
Insert 4 sample records:
INSERT INTO SECTOR (DEPARTURE_AP, ARRIVAL_AP, DEPARTURE_DT,ARRIVAL_DT, DEPARTURE_TM, ARRIVAL_TM, SID, PID ) values ('NRT','LAX',DATE '2012-05-15',DATE '2012-05-15',10.05,19.01,1, 1)
INSERT INTO SECTOR (DEPARTURE_AP, ARRIVAL_AP, DEPARTURE_DT,ARRIVAL_DT, DEPARTURE_TM, ARRIVAL_TM, SID, PID ) values ('NRT','LAX',DATE '2012-05-15',DATE '2012-05-16',23.00,06.15,2, 2)
INSERT INTO SECTOR (DEPARTURE_AP, ARRIVAL_AP, DEPARTURE_DT,ARRIVAL_DT, DEPARTURE_TM, ARRIVAL_TM, SID, PID ) values ('LAX','NRT',DATE '2012-05-25',DATE '2012-05-25',12.05,21.00,3, 1)
INSERT INTO SECTOR (DEPARTURE_AP, ARRIVAL_AP, DEPARTURE_DT,ARRIVAL_DT, DEPARTURE_TM, ARRIVAL_TM, SID, PID ) values ('LAX','NRT',DATE '2012-05-27',DATE '2012-05-27',11.05,20.00,4, 2)
ii) Table to store Price information as described belowCREATE TABLE PRICE (
PID INTEGER,
BASIC DECIMAL(10,2),
SURCHARGE DECIMAL(10,2),
TAX DECIMAL(10,2),
DISCOUNT DECIMAL(10,2),
CURR VARCHAR(3),
PRIMARY KEY (PID)
)
Insert 2 sample records: