Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose a car hire company has a database containing tables called CAR and CAR_STATUS. Each car is represented by the plate number, car make and

Suppose a car hire company has a database containing tables called CAR and CAR_STATUS. Each car is represented by the plate number, car make and model, date of registration, body colour, number of seater, capacity of the engine in cubic centimeters (cc), transmission, fuel type (Petrol or Diesel), car price and rental per day. The CAR_STATUS indicates the current odometer and the availability of cars for rental; Y car is available and N car is currently hired.

Write Oracle SQL commands to answer the following:

List the details of (i) all cars, (ii) Diesel cars and (iii) Toyota cars.

Using logical operators, list the plate number, makeModel, cc and price of cars, which cost between 40,000 and 65,000 inclusive or capacity of the engine in cubic centimeters (cc) more than 1.6.

List makeModel along with the total, average, maximum, and minimum price of cars in each model.

List the makeModel and total number of cars which maker begins with T.

List the platenum, makeModel, cc, transmission, fuel and rental rate of cars available for rental.

Assume the daily rental of cars with 2.0cc and above is increased by 10% and other cars by 5%. Reflect these changes in the relevant table.

Create a view called VIEWPETROL which returns a result containing the plate numbers, car make and model, transmission, fuel type and daily rental rate of Petrol cars. Then list out all cars in this view.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Bachelors degree in Information Systems or Statistics

Answered: 1 week ago