Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

MINI-PROJECT - GROUP 08

DATABASE SYSTEM MANAGEMENT

Instructor: Assoc. Prof. Tran Manh Ha

Problem 1.1: Airline Ticket Management

Group Member:
- Nguyen Minh Quan - MAMAIU19036;
- Huynh Kim Hoang Van - MAMAIU18062.
1. Problem:
An online airline ticket management system manages multiple sets of data:
● ticket information contains identifier, seat, time, departure, destination, passenger, etc.
● passenger information contains identifier, name, dob, address, passport, etc.
● flight information contains identifier, type of plane, number of seats, departure,
● destination, time etc.
● airline information contains identifier, name, nation, service, number of planes, etc.
Several constraints need to be defined, at least a ticket belongs to a passenger only, flight carries several
passengers, an airline possesses several flights and a flight can be shared by two or more airlines, etc.
This system allows managers to perform multiple functions on tickets, passengers,
flights and airlines using the user interface.

2. ERD:
3. Database Design:
4. File Structure:
We use 4 files in total:
1. homepage.html: HTML file, used for receiving information and requests from the user.
2. show-result.php: PHP file, used for showing data from the database.
3. search-result.php: PHP file, used for searching data in the database.
4. update-result.php: PHP file, used for updating data in the database.

5. Homepage.html:
This is the web page for interacting with the user. It consists of 3 main parts:
5.1. <style>: the decoration coding: background image, boxes, fonts, ...
5.2. <script>: jQuery code, for simple animations on the homepage.

5.3. <body>: consisting of several classes:


5.3.1. <showSearchUpdate>: let the user choose the action.
5.3.2. <showData>, <searchData>, <updateData>: show, search and update data in the database
according to user request.

6. Show Function:
6.1. Usage:
_ Show data in either one single table, or multiple tables joined together depending on the user's
choice.
_ User can choose what attribute to be included in the display.

6.2. Code Sample:


6.2.1. <showData>:
6.2.2. show-result.php:
6.3. Result:
Below are two sample results: first one for a single table (airline), second one for multiple tables.
7. Search Function:
7.1. Usage:
_ Search data in one single table depending on the user's choice.
_ User can choose what attribute is used for the searching.

7.2. Code Sample:


7.2.1. <searchTable>:
Below is the coding for searchAirline. The code for Flight/Passenger/Ticket are similar.
7.2.2. search-result.php:
Below is the coding for searchAirline. The code for Flight/Passenger/Ticket are similar.
7.3. Result:
Below is an example where the user tries to search for all Vietnamese passengers with last name
“Vu”.

8. Update Function:
8.1. Usage:
_Add, edit or delete data in one single table depending on the user's choice.
_User can choose what attribute is used for the update.
8.2. Code Sample: (continued next page)
8.2.1. <updateTable>:
Below is the coding for updateAirline. The code for Flight/Passenger/Ticket are similar.

8.2.2. Update-result.php:
Below is the coding for updateAirline. The code for Flight/Passenger/Ticket are similar.
8.3. Result:
Below are examples when the user tries to add/edit/delete data of Airline table.
9. Task Breakdown:
● ERD & Database Design: Quan & Van.
● Generate Sample Database: Van.
● Implement Database into MySQL server on xampp folder: Quan & Van.
● Coding homepage.html: Quan & Van.
○ <style>: Quan & Van.
○ <script>: Quan.
○ Show, Search and Update function: Quan & Van.
● Coding .php files: Quan.
● Report: Quan & Van.
10. References:
● Background picture for homepage.html: https://images.pexels.com/photos/62623/wing-plane-
flying-airplane-62623.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260
● Background picture for all result.php files: https://images.pexels.com/photos/1110670/pexels-
photo-1110670.jpeg
● Online source for jQuery: https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js

~~~THE END~~~

You might also like