Using the sample database, create the Relational Algebra expression to answer the following queries. The database schema is as follows: Cars (c_id:number, c_brand:string, color:string, c_condition:string) Dealers (d_id:number, d_name:string, d_location:string) Inventory (c_id:number, d_id:number, costpercar:number, instock:number) Note: Inventory represents cars sold by dealers.
Using the sample
The database schema is as follows:
Cars (c_id:number, c_brand:string, color:string, c_condition:string)
Dealers (d_id:number, d_name:string, d_location:string)
Inventory (c_id:number, d_id:number, costpercar:number, instock:number)
Note: Inventory represents cars sold by dealers.
How would I write a database queries for the following?
1. Find the names of Dealers who sell some Black Car
2. Find the d_id of Dealers who sell some Black or Silver Car
3. Find the d_ids of Dealers who sell some Black Car or are in Miami
4. Find the d_ids of Dealers who sell some Black Car and some Yellow Car
5. Find the d_ids of Dealers who sell every Black Car
6. Find the d_id of Dealers who sell used Cars that are Black
Trending now
This is a popular solution!
Step by step
Solved in 4 steps