Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are developing a system for storing information about car rides. You have the following queries for creating type and object table. CREATE TYPE RIDE

You are developing a system for storing information about car rides. You have the following queries for creating type and object table.

CREATE TYPE RIDE AS OBJECT( RIDE_ID NUMBER, CAR VARCHAR2(30), DISTANCE NUMBER, FUEL_CONSUMPTION NUMBER, FUEL_PRICE NUMBER )

CREATE TABLE JOURNEYS OF RIDE (PERSONAL_ID PRIMARY KEY )

Your system must provide a report with ride ID, car and distance that is sorted descending by the expenses of the ride. If the distance is above 100 km, Expenses should be calculated by multiplying fuel consumption, distance and fuel price. Otherwise a flat rate of 10 EUR is used. Write the following queries: 1) Extend the query for the type declaration to enable creating such report. the attributes of the type must remain unchanged (2 points); 2) Create Type body with the necessary method to create such a report (4 points); 3) Write a query to retrieve ride ID, car and distance and sort it descending by the total expenses (2 points).

Use the features of ORDB in this task!

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago