Question: A student built a car database with three tables, listed as follows, Car(VIN, Year, Model, Price, mID, SSN). Note the manufacturer of a car has
A student built a car database with three tables, listed as follows,
Car(VIN, Year, Model, Price, mID, SSN). Note the manufacturer of a car has a unique ID called mID, and SSN is the social security number of the car owner;
Customer(SSN, Name, Age, Birthday);
Manufacturer(mID, Name, Address);
In this database, every customer can have many cars, but one car can only be owned by a single customer. Please use relational algebra to answer the following queries. Note only the five basic operators plus renaming and join are allowed.
1. Find the model and price for all the cars that are manufactured by Aston Martin;
2. Find the VINs of all the cars that are owned by people named James Bond;
3. Find all car models that have a price less than 100, 000, are manufactured in or after 2016, and are not manufactured by Ford (Note in relational algebra, the not equal is represented by <>).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
