Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fast is a new car rental company that just started and is growing fast in several cities. The general manager decided to use a DBMS

Fast is a new car rental company that just started and is growing fast in several cities. The general manager decided to use a DBMS to help track the daily operations. Consider the following relation that links between the city where a branch is located, the offered car make and type, the number of cars available, the earliest date a car is available and the daily rental cost for the particular car make and type.

BranchCars

BranchCity

Make

Type

NrAvail

EarliestAvail

DailyRent

Chilliwack

Toyota

4Dr Sedan

4

16/12/2023

$19

Chilliwack

Toyota

2Dr Sport

2

11/11/2023

$44

Abbotsford

BMW

2Dr Sport

3

21/09/2023

$80

Abbotsford

Mazda

2Dr Sport

2

11/11/2023

$80

Langley

Mercedes

4Dr Sedan

2

30/11/2023

$85

Surrey

Toyota

4Dr SUV

4

01/11/2023

$85

Abbotsford

Toyota

4Dr SUV

1

10/10/2023

$20

Surrey

Jeep

4Dr SUV

1

10/10/2023

$66

Langley

Lincoln

Limousine

1

09/11/2024

$290

Write a relational algebra expression and the corresponding SQL query for each of the following:

1. List the branches where more than 2 cars are available before 12/12/2023.

2. List the branches that offer more than one Type of car.

3. List the average daily rent for each car Type.

4. List pairs of branches which offer similar car Makes regardless of Type, availability date or number of available cars .

5. Find the branch that offers the cheapest vehicle.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions