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 relational algebra, tuple relational calculus, and domain relational calculus (the answers to these queries in SQL are given in the next 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)
(b) ...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
(b) ...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q1: Describe the main characteristics of the Relational
Q2: Given two relations R and S,
Q3: The Relational and CODASYL models are examples
Q4: Choose any four relational algebra operators and
Q5: From an SQL user's perspective, does the
Q6: The following tables form part of a
Q8: Describe the difference between a base relation
Q9: The following tables form part of a