Question: Instructions When writing a query, write the query in a way that it would work over all possible database instances and not just for the

 Instructions When writing a query, write the query in a waythat it would work over all possible database instances and not just

Instructions When writing a query, write the query in a way that it would work over all possible database instances and not just for the given example instance! Consider the following database schema and example instance for a race car database: Good luck Car Racer A ID Name 1 Sam 2 Suzan 3 Alice Gender Birth_year M 1984 F 1982 F 1980 CID Manufacturer Horse_power Nbr of cylinder C1 Mercedes 1200 6 C2 Ferrari 2400 8 Mercedes 800 4 Result Race Sponsor RID R1 Result DC_ID R_ID A_ID Time R1 1 c1 R11 400 R1_2 C2 R1 |2 600 R1 3 C3 3 375 R D Type Location R1 F1 UK R2 RallyCross Portugal R3 F1 USA CID Sponsor C1 Motorola C3 C4 Michelin Pepsi R1 R2 R1 Schema: Racer: (A_ID, Name, Gender, Birth_year) Race (R_ID, Type, Location) Result (Result_ID, C_ID, A_ID, R_ID, Time) C_ID is a foreign key for car and A_ID is foreign key for Racer and R_ID is a foreign key for Race. Sponsor (R_ID, C_ID, Sponsor) Car (C_ID, Make, Horsepower) Question VII (4 Points) Write a relational algebra expression that returns the horsepower per cylinder, assuming that the horsepower is equally proportional to the number of cylinders. Question VIII (4 points) Write a relational algebra that returns the racer's name that only drives Ferrari. Question IX-(3 points) Write a relational algebra name that never participated in a 'rallycross' racer. Question X. (4 points) Write a relational algebra expression for the cars that finished the race in a time smaller than all races average time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!