Fun for Thursday, February 23, 2006
Let's look at http://ug.mit.edu/doc/flight-reservations.txt first. Questions:
select first, last from tickets, flights, people where flight_number = 237 and tickets.flight_id = flights.flight_id and people.person_id = tickets.person_id; versus select first, last from tickets, flights, people where flight_number = 237 and tickets.flight_id = flights.flight_id and people.person_id = tickets.person_id;Here's another take on it...
create table Flight_Schedule (
Flight_ID int primary key,
Flight# int not null,
Origin varchar(3) not null,
Destination varchar(3) not null,
Depart_Time datetime not null,
Arrive_Time datetime not null,
Date datetime not null
)
create table Airplane_Statistics (
Flight_ID int not null,
Seat# int not null,
Passenger_ID int
)
create table Passenger_Information (
Passenger_ID int primary key,
First_Names varchar(50) not null,
Last_Names varchar(60) not null,
CreditCard# varchar(16) not null,
Address varchar(100) not null
)
Questions:
Let's look at the Oracle binary-tree figure.