
Answer & Explanation:I need it as asap. bid if you can make it within 6 hours.
relational_algebra.docx
Unformatted Attachment Preview
Consider the following relations :
Driver(did : integer, name : string, age : integer)
Result(did : integer, teamid : integer, place : integer, race : integer)
Test(did : integer, teamid : integer, testdate : date, circuit : string)
Team(teamid : integer, tname: string)
The primary keys are shown in the attached image
The meaning of the relations is straightforward. Result indicates which driver, running for which team finished
in what place. Test indicates which driver is/was scheduled to test for which team.
Write the following queries in relational algebra, domain relational calculus and SQL. No duplicates should be
printed in the results. If some queries cannot be expressed in relational algebra or calculus, explain the reason.
1. Find the names of all drivers that scored a podium finish (i.e. finished at least 3rd).
2. Find the name of the oldest driver who either won a race or tested for team ‘Alpha’.
3. Find the names of all the teams that either won a race or tested at least 5 different drivers.
4. Find the names of the drivers who are scheduled to test for 2 different teams on the same day.
5. Find the names of the drivers who tested for team ‘Alpha’ and no other team.
6. Find the names of the drivers who tested for every team at least once.
7. Find the names of the teams who tested on every circuit where a test ever took place.
8. For each position from 1 to 3 find the average age of the drivers that finished in that position.
9. Find the names of the drivers that never finished a race.
10. For each team, find its highest finishing position in a race.
…
Purchase answer to see full
attachment
Order a plagiarism free paper now. We do not use AI. Use the code SAVE15 to get a 15% Discount
Looking for help with your ASSIGNMENT? Our paper writing service can help you achieve higher grades and meet your deadlines.

Why order from us
We offer plagiarism-free content
We don’t use AI
Confidentiality is guaranteed
We guarantee A+ quality
We offer unlimited revisions