Question: Problem 1. (80 points) Consider the relational database defined be create table passenger ( passenger_ID varchar (10), passenger_name varchar (30), passenger_city varchar (30), primary key

 Problem 1. (80 points) Consider the relational database defined be create
table passenger ( passenger_ID varchar (10), passenger_name varchar (30), passenger_city varchar (30),

Problem 1. (80 points) Consider the relational database defined be create table passenger ( passenger_ID varchar (10), passenger_name varchar (30), passenger_city varchar (30), primary key (passenger_ID)); create table seat train_number varchar (10), seat number varchar (10), primary key (train number seat number): create table reservation ( reservation number varchar (10), passenger.ID varchar (10), train number varchar (10) eat-number varchar(10), departure_station varchar (10) departure.time timestamp arrival station varchar(10), arrival time timestamp fare numeric ( 82) primary key (reservation number: foreign key (passenger-ID) references Passenger foreign key (train_number, seat number) references seat DEL (e) (10 points) Find the ID of every passenger who lives in (i.e., whose passenger_city is) 'Albany' and has never reserved any trip. For this query, use a left outer join. (f) (10 points) For each reservation whose departure time is between 2021-04-01 00:00:00' and 2021-04-02 23:59:59' (inclusive), update the fare as follows: If the current fare is greater than $100, decrease the fare by 5 percent. Otherwise, decrease the fare by 3 percent. (8) (10 points) Find the train(s) with the largest number of seats (i.e., trains with more seats or the same number of seats compared to every other train). For each of these trains, show the train number (h) (10 points) Find all of the trains whose seats were all reserved at least once on "2019-04-01'. For each of these trains, show the train number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!