Explain the three factors that influence the cost of a query

Assignment Help Database Management System
Reference no: EM13808438

1. Describe typical steps followed when processing a high-level query.

1843_query.png

The function of query parser is parser is parsing and translating a given high-level language query into its immediate form such ass relational algebra expressions. The function of the parser is to check both syntax and semantic of the queries. A parser tree of the query specifies only partially how to evaluate a query, there are several ways to evaluate a relational algebra expression. Therefore the steps that are followed in query processing are as follows:

i. Scanning and parsing.
ii. Query optimization or planning the execution strategy
iii. Query code generator(interpreter or compiled)
iv. Execution in the runtime database processor.

2. Compare the roles of a scanner and a parser with reference to query processing.

Scanning is the process of converting the query text into a tokenized representation. The tokenized representation is more compact and it is suitable for processing by the parser. The representation can be done in a tree form. The parser checks the tokenized representation for correct syntax. In this stage it checks to determine if columns and tables identified in the query exist in the database and if the query has been formed correctly with the appropriate keywords and structure. If the query passes the parsing checks, then it is passed on to the query optimizer.

3. What a query execution plan?

4. Discuss the reasons for converting SQL queries into relational algebra queries before optimization is done.

5. Explain the three factors that influence the cost of a query.

6. A file of 4096 blocks is to be sorted with an available buffer space of 64 blocks. How many passes will be needed in the merge phase of the external sort-merge algorithm?

7. In a particular transaction, the number of file blocks of data to be fetched is 6 while the size of entire file is 2048 blocks; evaluate the number of initial runs the transaction has to make.

8. How does a query tree represent a relational algebra expression? What is meant by an execution of a query tree? Discuss the rules for transformation of query tree, and identify when each rule should be applied during optimization.

9. Query optimization is a misnomer. Explain

10. Consider the following S table from a students' database.

Reference no: EM13808438

Questions Cloud

Risk-cost-politics and public relations : Every company has capital projects. The company you have selected must need something! Be it a new wing to the building, a new product line to be funded, a new piece of equipment, find one new acquisition your company needs. •Risk •Cost •Politics (ge..
How the status of women has changed during past two decade : Write an essay reviewing the status of women at California State University Northridge (CSUN) undergraduates, graduates, faculty or staff. Write about how the status of women has changed during the past two decade. Data must be included.
Changes in scope of an industry : Address the changes in scope of an industry (either an industry you are currently employed within or one that you would like to investigate and learn more about).
How has your initial perception of the client changed : How has your initial perception of the client changed
Explain the three factors that influence the cost of a query : Discuss the reasons for converting SQL queries into relational algebra queries before optimization is done.  Explain the three factors that influence the cost of a query
Sql queries will produce a correct response : Formulate SQL queries for (a) and (b) with reference to the database specified for homework 2. Ensure that your SQL queries will produce a correct response for every instance of the database. a. List the employeeid and salary of those supervisors who..
What is the percentage increase in the market : The market consists of the following stocks. Their prices and number of shares are as follows: The price of Stock C doubles to $60, what is the percentage increase in the market if a S&P 500 type of measure of the market is used? Repeat question (a) ..
Explain the role and importance of an sm within a company : Explain the role and importance of an SM within a company - Analyze the approach of your selected three companies toward sustainable management.
Firm multifactor productivity before and after changes : What is the firm's multifactor productivity before and after the changes? Why is it important to be aware of the productivity changes?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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