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

What are stand-alone procedures, What are stand-alone procedures? Proce...

What are stand-alone procedures? Procedures that are not part of a package are called as stand-alone because they independently defined. A good example of a stand-alone procedu

Explain alternate key, Explain Alternate key? Alternate Key - All the...

Explain Alternate key? Alternate Key - All the candidate keys except primary key are known as alternate keys.

Find names of employees, Consider the relations EMP(ENO,ENAME,AGE,BASIC_S...

Consider the relations EMP(ENO,ENAME,AGE,BASIC_SALARY) WORK_IN(ENO,DNO) DEPT(DNO,DNAME,CITY) Express the following queries in SQL (i) Find names of employees who work in a dep

What are the factors into account when choosing a raid level, What are the ...

What are the factors to be taken into account when choosing a RAID level? A) Monetary cost of extra disk storage requirements. B) Performance requirements in terms of number

Develop motel point of sale software, Project Description: I need a poin...

Project Description: I need a point of sale for motels. It needs to run on windows and requires being network able so that we can have more than one computer using it at once.

Employee elation with information, Consider a database application that dea...

Consider a database application that deals with an Employee relation with information such as SIN, name, data of birth (DOB), and DID (the ID of the department at which the employe

Managing database, 10A.53 Code an Oracle Database trigger to enforce the ...

10A.53 Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department. 10A.54 Code an Oracle Database trigger to allow the

Drop table command, DROP TABLE Command: When an existing object is not ...

DROP TABLE Command: When an existing object is not needed for further use, it is always better to eliminate it from the database. To remove the existing object from the databas

Describe the objective of structural diagrams, Describe the objective of St...

Describe the objective of Structural Diagrams The main objective of structural diagram is to visualize, construct, specify and document static aspects of a system. Their eleme

Explain different addressing modes of 8086, 1. Explain different addressing...

1. Explain different addressing modes of 8086 Explanation of all addressing modes 2. Write a sequence of instructions to exchange two register contents using stack

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