Query optimization in database system, Database Management System

Assignment Help:

Problem :

AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations:

PASSENGER(p_no, p_name, p_address, p_phone)
FLIGHT(flight_code, airline_name, from_airport, to_airport, depart_time, arrive_time)
BOOKING(booking_no, p_no, invoice_total, payment_made)
FLIGHT_BOOKING(booking_no, flight_code, flight_date, price)

The following assumptions are made:

  • The flight code is unique, which includes information on an airline and its flight number, for example „BA300?
  • For each flight code, there is only one associated flight on any particular day
  • A passenger may purchase tickets for several different flights under one booking number
  • However, a passenger may not purchase more than one ticket for the same flight under the same booking number
  • The PASSENGER relation contains 2000 records
  • The FLIGHT relation contains 500 records
  • The BOOKING relation contains 5000 records
  • The FLIGHT-BOOKING relation contains 10000 records 
  • Each flight has a maximum of 200 bookable tickets (seats)

(a) Query optimization in database system aims to improve efficiency in query evaluation. One of the stages involved in the query optimization is to convert some internal form of the query representation into its equivalent but more efficient canonical form using the transformation rules.

Demonstrate, by using two query examples based on the above given relations, how appropriate transformation rules can be applied to carry out such a conversion.

(b) Consider the following query based on the above relations and formulate it using correct SQL syntax:

"Find the names and numbers of all passenger who have booked the Air Mauritius flight MK356 for 2nd December 2010".

(c) Specify two possible options to evaluate the query in (b). Express each of these options firstly in relational algebra and secondly in a query tree. Clearly show all the steps required in the evaluation of the query.

(d) For each option identified above, calculate the size (number of records) for each of the immediate relations to be produced at each steps. Recommend the best option based on the results of your calculations.


Related Discussions:- Query optimization in database system

Explain the weak entity set, Explain the Weak Entity Set An Entity set...

Explain the Weak Entity Set An Entity set which does not have sufficient attribute to make a primay key is known as weak entity set. For instance, dependents of an employee in

Define lock, Define lock? Lock is the most common used to execute the r...

Define lock? Lock is the most common used to execute the requirement is to permit a transaction to access a data item only if it is currently holding a lock on that item.

Architectural standard, Architectural standard: Designation : Archit...

Architectural standard: Designation : Architect , Consultant Job Profile : As a part of Oracle Fusion Middleware at Satyam, I am involved with Presales, Delivery, A

State in brief about object design, Give the Introduction of OBJECT DESIGN ...

Give the Introduction of OBJECT DESIGN Strategies which are selected during system design are carried out in object-oriented design. In this procedure, objects which are identi

find a non-redundant cover and canonical cove, Given the following set of ...

Given the following set of functional dependencies {cf→ bg, g → d, cdg → f, b → de, d → c} defined on R(b,c,d,e,f,g) a. Is cf→ e implied by the FDs? b. Is dg a superkey?

Describe queries with complex types, Describe queries with complex types? ...

Describe queries with complex types? The present extension of the SQL query language deal with the complex type Let us start with the simple example: Find the title and t

Data envelopment analysis , I need a help with my assignment of data envelo...

I need a help with my assignment of data envelopment analysis which is due for submission next week on monday the 10th Dec. Will you be able to help so that I can submit it on tim

What is relational dbms, What is Relational DBMS This is our subject of...

What is Relational DBMS This is our subject of study. A DBMS is relational if the data is organized into relations, that is, tables. In RDBMS, all data are kept in the well-kno

Define catalog and meta data, Define Catalog and meta data ? A catalog ...

Define Catalog and meta data ? A catalog is a compilation of records elaborating the contents of a particular collection or group of collections. Metadata (Meta data, or someti

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd