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

Define hash files organization, Define Hash files organization a. Hashi...

Define Hash files organization a. Hashing includes computing the address of a data item by calculating a function on the search key value.   b. A hash function h is a functi

Explain differance between primary and secondary storage, Explain differanc...

Explain differance between Primary and secondary storage ? Primary and secondary storage Computer storage is classified within primary(main) memory and secondary(per

Implementation of database, The ER diagram clearly showing the additional t...

The ER diagram clearly showing the additional tables you have implemented. SQL table creation scripts for the tables you have set up. SQL scripts showing the sample data you

Which is an advantage of view, Which is an advantage of view? The Advan...

Which is an advantage of view? The Advantages of view is Data security, Derived columns and Hiding of complex queries

Concurrency control, Give the two reasons for allowing concurrency

Give the two reasons for allowing concurrency

Key to represent relationship between tables is called, Key to represent re...

Key to represent relationship amongs tables is called ? A Key that represent the relationship between tables is called Foreign Key.

Subclassing, In the ER diagram, one example of subclassing is depicted foll...

In the ER diagram, one example of subclassing is depicted following the Services entity. The subclasses Item Based and Time Based are created. The entity Services gains the attribu

Er schema can be represented by relation schemas , Q. Describe how an ER sc...

Q. Describe how an ER schema can be represented by relation schemas and constraints arising from ER design can be mapped to constraints on a relation schema.     The entity rela

Set difference, Set Difference If R1 and R2 are two union compatible re...

Set Difference If R1 and R2 are two union compatible relations or relations then result of R3 =R1- R2 is the relation that have only those tuples that are in R1 but not in R2.

What is disadvantage of multiple inheritances, What is disadvantage of mult...

What is disadvantage of multiple inheritances? There is potential ambiguity if the similar variable or method can be inherited from more than one superclass.eg: student class m

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