subject

FLIGHT = ( FlightN, FromCity, ToCity, Date, DepartureTime, ArrivalTime ) //. You may use <, >, !=, or = between any two dates or between any two times. Also, you may assume the attribute Date = arrival date= departure date and that ToCity and FromCity are in the same time zone. TICKET = ( TicketN, FlightN, Cost, Completed ) // Since Ticket# and Flight# together are the key, this means a single ticket may include several flights. Completed may assume the values ‘Yes’ or NULL, Null means the flight hasn’t been completed.
PASSENGER = ( Name , TicketN ) // This table includes every passenger and the ticket numbers he or she purchased. Assume the name of the passenger is unique.
Express the following queries by SQl statements using a minimum number of tables and operations:
1. List every possible flight schedule from "LA’ to "NY" with only one stop. The flight schedule includes DepartureTime time from LA, Name of a stop city, ArrivalTime to the stop, DepartureTime from the stop, ArrivalTime to NY. Assume both flights are on the same date.
2. Retrieve the names of every passenger and total amount paid for the tickets he/she purchased.
3. Retrieve the names of all passengers who have traveled to "LA’ at most two times. .

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Me dangers of social media and the internetexplain what each means: 1) social media and phones have become an addiction.2) outside people have access to you all the time.3) cyberstalking4) cyberbullying5) catphishing6) viruses7) identity theft8) credit card fraud9) hacking10) money schemes
Answers: 1
You know the right answer?
FLIGHT = ( FlightN, FromCity, ToCity, Date, DepartureTime, ArrivalTime ) //. You may use <, >,...
Questions
question
Geography, 23.10.2021 21:50
question
Mathematics, 23.10.2021 21:50
question
History, 23.10.2021 21:50
Questions on the website: 13722367