STA TRAVEL AUSTRALIA Rumana Islam HD Assignment 3, Autumn 2007.

Slides:



Advertisements
Similar presentations
Tutorial SSD. 1 Domain: mail order video company Use Case: processing an order Actors: order processing administrator, customer Description: Customer.
Advertisements

SSD Examples. Example 1 Actor ActionSystem Response 1.The Sales Person enters customer Details (name, address, phoneNo, customerId) 2. System saves customer.
Dec 15, 2003Murali Mani Transactions and Security B term 2004: lecture 17.
Database – Part 2a Dr. V.T. Raja Oregon State University.
1. 2 icoffey ****** 3 decimal numbers Sales.
The 2 nd Hand Student Book Database Jon Havier High Distinction Assignment, Autumn 2007.
Reserving Airplane Tickets. Learning Objectives Know how to use Internet travel websites to research and reserve airplane tickets. Know how to use Internet.
By Sean Boange.  This Database is modelled on the Computer Hardware Store MSY At current they display the numerous products they sell.
The Carnie_MyCareer Case Study Peter Ebeid Dane Harris Stephanie Ho Chris Zaharia Distinction Assignment, Autumn 2007 Presented by.
SQL Server 7.0 Maintaining Referential Integrity.
“National Electoral Division Profiles” Case Study Vincent Tang High Distinction Assignment, Autumn 2007.
1 Intro to JOINs SQL INNER JOIN SQL OUTER JOIN SQL FULL JOIN SQL CROSS JOIN Intro to VIEWs Simple VIEWs Considerations about VIEWs VIEWs as filters ALTER.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL for Data Retrieval. Review Questions of Previous Class Q1. Show the sum of hours worked for project with ID 1200 (use ASSIGNMENT table) – Use “SUM”
Recap of SQL Lab no 8 Advance Database Management System.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Soompi Music By: Karen Sin. Introduction to Soompi Music This database models from the various artists and group data gathered from the Korean based English.
Moshtix Case Study High Distinction assignment By Annie Tran.
Netball case study Harryanto Surjani. domain Team names Team locations – where they’re based Game venues – Venue name and what the stadium is called Draw.
DBSQL 5-1 Copyright © Genetic Computer School 2009 Chapter 5 Structured Query Language.
Indexes and Views Unit 7.
Business Case Scenario XYZ Airlines is an up and coming airline in Asia which has been steadily growing these past few years. Currently, the ticket sales.
Database Principles Autumn 2007 High Distinction Assignment REBEL Sport Online Author: Joseph Diver.
Chapter 4 Relational Database, Pivot Charts, and Switchboard.
Jenny Jirathammakul High Distinction Assignment Database Principles Autumn, 2007 Melbourne City Toyota.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
CHEAPEST DAYS TO FLY INTERNATIONALLY Flights Search Engine. Searches and matches routes to find the cheapest flights between any two places. Get The Best.
Concur Travel and Expense Management Booking Travel.
THE DATABASE OF MSY TECHNOLOGY PTY. LTD PRODUCT Ronald Diningrat High Distinction Assignment Autumn 2007.
PSA AIRLINES  PSA airlines is totally owned subsidiary of american group of airlines and headquartered in dayton international airport.  PSA airlines.
Hainan Airlines Reservations. Why choose Hainan Airlines?
EVA AIR RESERVATIONS.  EVA Air Corporation is a Taiwanese international airline based at Taiwan Taoyuan International Airport near Taipei, Taiwan, operating.
The Booktopia Database
 EVA Air Corporation is a Taiwanese international airline, operating passengers and dedicated cargo services to over 40 international destinations in.
Air New Zealand limited is a flight carrier airline or group of New Zealand airline, based in Auckland. The air new Zealand operates scheduled passenger.
Air NewZealand Ticket reservations
JET BLUE CHEAP FLIGHTS JETBLUE AIRWAYS.
SilkAir Reservations Phone Number
Hawaiian Airlines Reservations |
Royal Air Maroc Customer Service Phone Number
Virgin America Airlines Reservations Number
1-888(202)5328 Turkish Airlines Booking Number
Air France Reservations Phone Number
Swiss Air Reservations Phone Number for More Flight Services
BRUSSELS AIRLINES RESERVATIONS PHONE NUMBER|CUSTOMER SERVICE
Horizon Air Reservations Phone Number
KLM Airlines Reservation Number Customer Service
Bangkok Airways Reservations Phone Number
Spirit Airlines Customer Service On Duty|Help And Support For All Queries
For cheap flights,plan and Discount Dial Southwest Airlines Customer Service Phone Number
Air Canada Airlines Number Air Canada Airlines Customer Service is 24x7 hour traveling service provide for tourists. If you are travel.
Southwest Airlines Telephone Number Queries related to Southwest Airlines flight fares, flight schedules, flight timetable, flight destination.
PSA Airlines Phone Number PSA Airlines Booking Number To get the best cheap ticket booking for last minutes flight booking.
Frontier Airlines Phone Number Book your Frontier Airlines flight tickets, manage reservation, baggage delay you need to call us at Fly Frontier Airlines.
Frontier Airlines Phone Number Book your Frontier Airlines flight tickets, manage reservation, baggage delay you need to call us at Fly Frontier Airlines.
Southwest Airlines Customer Service for baggage allowance policy
Air France Reservations Phone Number
To get information about online flight ticket reservation Website:
KLM Airlines reservations phone number KLM Airlines reservations phone number is required if you have plans for a smoother and pleasant trip. KLM Airlines.
Delta Airlines Cheap Flights Find & Book Cheapest Flight Ticket on Delta Airlines.
Delta Airlines Reservation Number CALL: Book your tickets now for Delta Airlines. Call now at the toll-free number and book your tickets.
Website - Airlines Help Desk.
By James Life Website: jameslifebooks.weebly.com
Philippines Airlines Seat Reservations
1888 Press Release - Preferred Seating in Economy now Available on THAI
Welcome To Allegiant Air. Allegiant Air Reservations Process Every passenger wants to travel but they restrict themselves due to high fare charges. And.
Presentation transcript:

STA TRAVEL AUSTRALIA Rumana Islam HD Assignment 3, Autumn 2007

STA Travel Database This Database application was inspired by the ‘STA Travel Australia’ website. The Database contains details about Airline, Airplane, Flight and Ticket. It also contains information of the user booking tickets and details of the passengers a user books tickets for. The database is limited to the reserving and purchasing of tickets and does not include other special services and deals offered by STA Travel

STA Travel Database ERD

1:m Relationship UsersID UTitleUFirstNameOther columns 1 MsRumana… 2 MrJohn… 3 MrAlfred… … ……… User Reservation UserIDReservationIDReservationDate …… Foreign key User– Reservation

m:m Relationship PassengerIDFlightIDPFSeatNumberOther Columns 1153J… 1244M… 2153K… 3153L… PassFlight Flight Passenger FlightFlightNumberOriginDestinationOther Columns 1SQ432SydneySingapore… 2SQ241SingaporeDhaka… 3QF350SydneyNew York…..………… PassengerIDPTitlePFirstNameOtherColumns 1MsRumana.. 2MsRehnuma.. … …… m:m relationship Flight-Passenger

Single Table Query Selecting a few items from the Flight SELECT FlightNumber, Origin, Destination FROM Flight; flightnumber | origin | destination SQ432 | Sydney | Singpore SQ241 | Singapore | Dhaka QF350 | Sydney | New York CX520 | Sydney | London KL366 | Brisbane | Amsterdam KL363 | Melbourne | Munich TG201 | Sydney | Bangkok (7 rows)

NATURAL JOIN Identifying users reserving tickets for passengers and when? SELECT UFirstName, PFirstName, PPassportNumber, ReservationDate FROM Users NATURAL JOIN Reservation NATURAL JOIN Passenger; ufirstname | pfirstname | ppassportnumber | reservationdate Rumana | Rumana | L898902C | Rumana | Rehnuma | L923034Z | Rumana | Rafiqul | N123489B | Rumana | Milie | B947321F | John | James | L629374P | Alfred | Alfred | L102571G | Jessica | Jessica | L581290X | Adam | Adam | K437920F | Lara | Lara | L902257D | (9 rows)

NATURAL JOIN (Cross Product) Identifying users reserving tickets for passengers and when SELECT UFirstName, PFirstName,PPassportNumber, ReservationDate FROM Users, Reservation, Passenger Where Users.UsersID = Reservation.UsersID AND Reservation.ReservationID=Passenger.ReservationID; ufirstname | pfirstname | ppassportnumber | reservationdate Rumana | Rumana | L898902C | Rumana | Rehnuma | L923034Z | Rumana | Rafiqul | N123489B | Rumana | Milie | B947321F | John | James | L629374P | Alfred | Alfred | L102571G | Jessica | Jessica | L581290X | Adam | Adam | K437920F | Lara | Lara | L902257D | (9 rows)

GROUP BY List PassengerID and group by number of flights a passenger is associated to SELECT PassengerID, PFirstName, PSurname, count(*) as NumberofFlights FROM PassFlight natural join Passenger GROUP BY PassengerID,PFirstName, PSurname order by PassengerID; passengerid | pfirstname | psurname | numberofflights | Rumana | Islam | 2 2 | Rehnuma | Islam | 1 3 | Rafiqul | Islam | 1 4 | Milie | Islam | 1 5 | James | Foster | 1 6 | Alfred | Lai | 1 7 | Jessica | Peterson | 1 8 | Adam | Brody | 1 9 | Lara | Roberts | 1 (9 rows)

Sub Query Identify the cheapest ticket bought by passenger named ‘Rumana Islam’ SELECT Distinct TicketPrice, PaymentDate FROM Ticket NATURAL JOIN Payment WHERE CardHolderName = 'Rumana Islam' And TicketPrice <= all (SELECT TicketPrice FROM Ticket NATURAL JOIN Payment WHERE CardHolderName = 'Rumana Islam'); ticketprice | paymentdate | (1 row)

Self Join Finding two passengers who paid for their tickets using a MasterCard SELECT c1.cardholdername, c2.cardholdername, c1.cardtype FROM payment c1,payment c2 WHERE c1.cardtype = c2.cardtype AND c1.cardtype='Mastercard' AND c2.cardtype='Mastercard' AND c1.ticketid>c2.ticketid; cardholdername | cardholdername | cardtype Jessica Peterson | John Smith | Mastercard (1 row)

Check Statements Checking for Passenger Service Class type CONSTRAINT PassFlight_PFServiceClass CHECK (PFServiceClass IN ('Economic','Business','First')) Checking for Date of Birth CONSTRAINT Users_UDOB CHECK (UDOB >= ' ') Checking for Card Expiry Date CONSTRAINT Payment_CardExpiryDate CHECK (CardExpiryDate BETWEEN ' ' AND ' ')

Action Statements On Delete Restrict CONSTRAINT Passenger_ReservationIDFK FOREIGN KEY (ReservationID) REFERENCES Reservation ON DELETE RESTRICT ON UPDATE CASCADE On Delete Cascade CONSTRAINT AirPlane_AirLineFK FOREIGN KEY (AirLineID) REFERENCES Airline ON DELETE CASCADE ON UPDATE CASCADE

Views Creating a view for PassengerFlightDetails CREATE VIEW PassengerFlightDetails (PFirstName, PSurname, FlightNumber, Origin, Destination, PFSeatNumber) AS SELECT PFirstName, PSurname, FlightNumber, Origin, Destination, PFSeatNumber FROM Passenger NATURAL JOIN PassFlight NATURAL JOIN Flight; Selecting Details of Passenger flying the KLM Royal Dutch Airlines SELECT PFirstName, PSurname, FlightNumber, Origin, Destination, PFSeatNumber FROM PassengerFlightDetails WHERE FlightNumber LIKE ‘KL%’; pfirstname | psurname | flightnumber | origin | destination | pfseatnumber Jessica | Peterson | KL366 | Brisbane | Amsterdam | 23B Adam | Brody | KL363 | Melbourne | Munich | 20F (2 rows)

Thank You! QUESTIONS?