Essay
A relational database contains details about journeys from Paisley to a variety of destinations and contains the following relations:
Operator (opCode, opName)
Journey (opCode, destinationCode, price)
Destination (destinationCode, destinationName, distance)
Each operator is assigned a unique code (opCode) and the relation operator records the association between this code and the operator's name (opName). Each destination has a unique code (destinationCode) and the relation destination records the association between this code and the destination name (destinationName), and the distance of the destination from Paisley. The relation Journey records the price of an adult fare from Paisley to the given destination by as specified operator, several operators may operate over the same route.
Formulate the following queries using SQL (the answers to these queries in relational algebra, tuple relational calculus, and domain relational calculus were given in the previous section):
(a) List the details of journeys less than £100.
(b) List the names of all destinations.
(c) Find the names of all destinations within 20 miles.
(d) List the names of all operators with at least one journey priced at under £5.
(e) List the names of all operators and prices of journeys to 'Ayr'.
(f) List the names of all destinations that do not have any operators.
Correct Answer:

Verified
(a)SELECT *
FROM Journey
WHERE price < 1...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
FROM Journey
WHERE price < 1...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q6: (a) In PL/SQL what is a Cursor?
Q7: The relational schema shown below is part
Q8: (a)SQL*Plus environment variables are set to
Q9: (a) What is a 'table' and what
Q10: Oracle database consists of logical and physical
Q12: Write SQL*Plus commands to do the following:
Q13: (a) What is a SQL*Plus script? Why
Q14: The following tables form part of a
Q15: State the three primary uses of Oracle
Q16: The following tables form part of a