Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. For the user query given in the image, convert the user choices into an SQL if the table has the following columns: Flights(fNo, departure_date,

image text in transcribed

Q1. For the user query given in the image, convert the user choices into an SQL if the table has the following columns: Flights(fNo, departure_date, arrival_date origin, destination, booked_seats, free_seats, total_seats) fNo stands for flight number.

1. Select fNo from Flights where origin=Guwahati and destination=Visakhapatnam;

2. Select fNo from Flights where origin=Guwahati and destination=Visakhapatnam and departure_date = 27-Jan-2022 and arrival_date=17-Feb-2022;

3. Two queries need to be written as (1) Select fNo from Flights where origin=Guwahati and destination=Visakhapatnam and departure_date = 27-Jan-2022 and free_seats >= 1; (2) Select fNo from Flights where origin=Visakhapatnam and destination=Guwahati and departure_date = 17-Feb-2022 and free_seats >= 1;

4. Two queries need to be written as (1) Select fNo from Flights where origin=Guwahati and destination=Visakhapatnam and departure_date = 27-Jan-2022 and arrival_date = 17-Feb-2022 and free_seats >= 1; (2) Select fNo from Flights where origin=Visakhapatnam and destination=Guwahati and departure_date = 27-Jan-2022 and arrival_date=17-Feb-2022 and free_seats >= 1;

Q2. For the user inputs given in the image who is responsible for generating the SQL query?

1. Web browser side code

2. Web server side code

3. Database client

4. Database server

= IndiGo Q Search FA Q Book Manage Book a Flight One Way From Guwahati (GAU) Round Trip Multi-city Visakhapatnam (VTZ) Departure Date 27 Jan 2022 Return Date 17 Feb 2022 Passenger(s) & Extra Seat(s) 1 Pay in (currency) Indian Rupees Armed Forces Family & Friends Students LTC Doctors & Nurses Unaccompanied Minor Search Flight

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions