Sie sind auf Seite 1von 13

 

CST336 Internet Programing 


 
Victor Ramirez 
Aboubacar Diawara 
Cristian Palomo-Ramirez 
Juan Sebastian Delgado 

Landing Gear 
Final Project, Summer 2019 
 
Project Url 1 

Description 1 

Mockups 3 

Screenshots 4 

Schema 11 

Project Url 
https://vasc9-final.herokuapp.com/ 

Description 
Landing Gear is a simple ticketing system for booking flights. The system allows both users and 
admins to search for flights using an ​additive filter​ where each field narrows the search criteria to 
make finding the desired flight easier. There are two sides to the system:  

User: ​Our customers have the ability to create a login, search for available flights, and book 
flights adding a number of seats. Users will also be able to browse the flights they have booked, 
and cancel them. On the reservations page, the user can also see the total number of seats 
booked (​sum quantity​ of seats reserved). 

We have created a basic user with the “username/password” credentials for testing. There are a 
number of users created in the website with pre-populated data. For those dummy users, the 
username and password are the same (i.e. johndoe/johndoe) 

 
 
 

Admin:​ The system also has an admin panel with a basic functionality. Admins can view and 
search all flights as users do. However, they also have the ability to schedule, update and delete 
flights. A default admin has been created using the credentials “admin/secret”. Additionally, they 
have access to three reports that provide deep insight into the system:  

1. Airport Transit Breakdown:​ Provides the usage analytics of each airport as either a 
destination or origin of flights. Admins can then understand what airports have the most 
air traffic and passenger traffic. 
2. User Reservations Breakdown:​ This report provides insight into user reservation 
patterns. It allows the admin to understand learn both their Whales and Frequent Flyer 
behaviors. Then target those users for incentive programs, exemptions, corporate 
accounts, etc. 
3. Flight Inventory Breakdown:​ Generates a report of flight popularity. Displays the number 
of flights scheduled, their capacity and booking average. Admins can then make 
decisions on what flights can be removed, or where more flights would be beneficial for 
the business. 

   
 
 

Mockups 

 
 

   
 
 

Screenshots 
Index 

“Flying From” Search 

 
 
 

“Flying To” Search 

Search By Flight Number 

 
 
 

Login 

Reservations 

 
 
 

Cancel Reservations 

Admin Index 

 
 
 

Update Flight 

Add Flight 

 
 
 

Report A 

Report B 

 
 
 

Report C 

   
 
 

Schema 
 
-- MySQL Script generated by MySQL Workbench
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering

SET​ @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;


SET​ @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET​ @OLD_SQL_MODE=@@SQL_MODE,
SQL_MODE=​'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DA
TE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'​;

-- -----------------------------------------------------
-- Schema Landing Gear
-- -----------------------------------------------------

-- -----------------------------------------------------
-- Table `admins`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`admins`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`admins`​ (


​`admin_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`username`​ ​VARCHAR​(10) ​NULL​,
​`password`​ ​VARCHAR​(72) ​NULL​,
PRIMARY ​KEY​ (​`admin_id`​))
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;

-- -----------------------------------------------------
-- Table `airlines`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`airlines`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`airlines`​ (


​`airline_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`flight_number`​ ​VARCHAR​(5) ​NOT​ ​NULL​,
​`capacity`​ ​INT​(10) ​NULL​,
PRIMARY ​KEY​ (​`airline_id`​))
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;
 
 

-- -----------------------------------------------------
-- Table `airports`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`airports`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`airports`​ (


​`airport_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`city_name`​ ​VARCHAR​(50) ​NOT​ ​NULL​,
​`airport_code`​ ​VARCHAR​(3) ​NOT​ ​NULL​,
PRIMARY ​KEY​ (​`airport_id`​))
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;

-- -----------------------------------------------------
-- Table `flights`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`flights`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`flights`​ (


​`flight_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`airline_id`​ ​INT​(10) ​NOT​ ​NULL​,
​`origin_airport_id`​ ​INT​(10) ​NOT​ ​NULL​,
​`destination_airport_id`​ ​INT​(10) ​NOT​ ​NULL​,
​`departure_timestamp`​ ​INT​(10) ​NOT​ ​NULL​,
PRIMARY ​KEY​ (​`flight_id`​),
​INDEX​ ​`airline_ID`​ (​`airline_id`​ ​ASC​),
​INDEX​ ​`airport_ID`​ (​`origin_airport_id`​ ​ASC​),
​INDEX​ ​`flight_ibfk_3_idx`​ (​`destination_airport_id`​ ​ASC​),
​CONSTRAINT​ ​`flight_ibfk_1`
FOREIGN ​KEY​ (​`airline_id`​)
​REFERENCES​ ​`airlines`​ (​`airline_id`​),
​CONSTRAINT​ ​`flight_ibfk_2`
FOREIGN ​KEY​ (​`origin_airport_id`​)
​REFERENCES​ ​`airports`​ (​`airport_id`​),
​CONSTRAINT​ ​`flight_ibfk_3`
FOREIGN ​KEY​ (​`destination_airport_id`​)
​REFERENCES​ ​`airports`​ (​`airport_id`​)
​ON​ ​DELETE​ ​NO​ ​ACTION
​ON​ ​UPDATE​ ​NO​ ​ACTION​)
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;
 
 

-- -----------------------------------------------------
-- Table `users`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`users`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`users`​ (


​`user_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`username`​ ​VARCHAR​(15) ​NOT​ ​NULL​,
​`password`​ ​VARCHAR​(72) ​NOT​ ​NULL​,
PRIMARY ​KEY​ (​`user_id`​))
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;

-- -----------------------------------------------------
-- Table `reservations`
-- -----------------------------------------------------
DROP​ ​TABLE​ ​IF​ ​EXISTS​ ​`reservations`​ ;

CREATE​ ​TABLE​ ​IF​ ​NOT​ ​EXISTS​ ​`reservations`​ (


​`reservation_id`​ ​INT​(10) ​NOT​ ​NULL​ AUTO_INCREMENT,
​`user_id`​ ​INT​(10) ​NOT​ ​NULL​,
​`flight_id`​ ​INT​(10) ​NOT​ ​NULL​,
​`count`​ ​INT​(10) ​NOT​ ​NULL​,
PRIMARY ​KEY​ (​`reservation_id`​),
​INDEX​ ​`acc_number`​ (​`user_id`​ ​ASC​),
​INDEX​ ​`flight_ID`​ (​`flight_id`​ ​ASC​),
​CONSTRAINT​ ​`reservation_ibfk_1`
FOREIGN ​KEY​ (​`user_id`​)
​REFERENCES​ ​`users`​ (​`user_id`​),
​CONSTRAINT​ ​`reservation_ibfk_2`
FOREIGN ​KEY​ (​`flight_id`​)
​REFERENCES​ ​`flights`​ (​`flight_id`​))
ENGINE​ = ​InnoDB
DEFAULT​ ​CHARACTER​ ​SET​ = latin1;

SET​ SQL_MODE=@OLD_SQL_MODE;
SET​ FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET​ UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;