Question: Write relational algebra (not SQL) queries to select various sets of data from an auto dealership database. Any help is appreciated. Thank you! About the

Write relational algebra (not SQL) queries to select various sets of data from an auto dealership database. Any help is appreciated. Thank you!

About the database:

The entities in the database are: ? Vehicle ?- The base class for types of vehicles to be sold. ? Make ?- The brand of vehicle. (e.g. BMW, Ford etc) ? Model? - The specific model (2 Series, Focus etc). First production year is the first year that model was ever made. ? Vehicle_Incentive? - A relationship table between Vehicles and Incentives. Keeps track of when the incentive for that vehicle expires. ? Incentive ?- Discounts and other deals. Type includes things like Factory or Dealer, depending on who is offering the incentive. ?Inventory? - The actual stock of vehicles in the lot. The price is the MSRP for that specific vehicle. ? Color ?- The potential colors cars can come in. The name is the name given by the factory (eg. Taffeta white). The code is the hex representation of that color (e.g. #FFFAFA)

SCHEMA

Write relational algebra (not SQL) queries to select various sets of data

Write in Relational algebra notation for question 1

Questions

1. Select the make_name, model_name and incentive amount for all vehicles on the lot with an incentive type dealer.

2. For problem above, convert your relational algebra query into a SQL query

Model Vehicle PK vehicle_id FK1 fk make id FK2 fk modelid Vehicle Incenive PK,FK1 fk vehicle id PK,FK2 fk incentive id PK model_id model_name year valid till year Make PK make id Incentive make name PK incentive id Inventory PK nventory_id FK1 fk vehicle id FK2 fk color_id type amount conditions country Color PK color id price name code

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!