Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please follow the instructions and answer in relational algebra. thank you and show your work Problem 1. (80 points) Consider the relational database defined below:

image text in transcribedimage text in transcribed

please follow the instructions and answer in relational algebra. thank you and show your work

Problem 1. (80 points) Consider the relational database defined below: 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), seat number varchar(10), departure_station varchar(10), departure_time timestamp arrival station varchar(10), arrival_time timestamp, fare numeric (8, 2), primary key (reservation_number), foreign key (passenger_ID) references passenger , foreign key (train_number, seat_number) references seat); Express in SQL each of the following queries: Problem 2. (20 points) Consider the relational database defined in Problem 1. Express in rela- tional algebra each of the following queries: (a) (10 points) Show the train number of each train that has more than 1000 seats. (b) (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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago