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

  Provide the sql to amend the original table design

You have been given the following specifications of a simple database for a netball association that keeps record of players, teams and matches.

  Imagine that you have been hired as the database

imagine that you have been hired as the database administrator for a local department store. the department store has

  Create a new table in which to store publisher information

In the following project, you will open a database containing the inventory of a bookstore, create a new table in which to store publisher information, add records, and then sort the table

  Draw a data flow diagram

You have been provided three diagrams - a Context Diagram (DFD), Level-0 Diagram, and the A-0 Diagram (IDEF). For this problem, you will be asked to re-draw or construct the following diagrams:

  Object-oriented databases

Object-oriented databases, Write a paper that describes the topic in detail. Include descriptions covering the following subject areas

  Create a sequence and a communication diagram

Create a sequence and a communication diagram for each scenario of each use case identified in the functional model. Create a behavioral state machine for each of the complex classes in the class diagram

  Modify oracle table data using the correct sql statements

modify oracle table data using the correct sql statements. you must create the statements in oracle by using the

  Types of keys used in relational database

Explain with examples different types of keys used in relational database, how they help relating different tables.

  Difference between a data warehouse and a data mart

The difference between a data warehouse and a data mart is, Which of the following is not an example of the emerging mobile computing platforms

  A prestigious university has recently implemented a

a prestigious university has recently implemented a consolidation strategy that will require it to centralize their

  The role of databases and database management systems

Describe the role of databases and database management systems in managing organizational data and information. Recognize the historical development of database management systems and logical data models.

  Explain data normalization

Data Normalization: What is the importance of data normalization in the reduction of insertion and deletion anomalies? Provide examples of insertion and deletion anomalies. - Explain why it is important to reduce insert and deletion anomalies.

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