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

  Q1with the new unsw timetabling system the lic of each

q1with the new unsw timetabling system the lic of each course is required to specify what facilities they require in

  Draw an entity relationship diagram

Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees. Each employee is identified by an Employee_Id. The company wants to store Employee_Name, Employee_Address, and Employee_BirthDate in the d..

  Create and passunittests for each repository method

Create and PassUnitTests for each repository method in Your Mongo Participant Repository, Create Participant

  Discuss the costs involved in implementing the database

Using the SafeAssign link in Blackboard to submit your report. Download and print out the FULL report and attach to the appendix at the back of your report. Assignments without the full SafeAssign report will NOT be marked.

  Sketch hash table to result from using hash function

Sketch hash table of length 11 which results from using hash function h(i) = (2i + 5) mod 11, to hash the keys 12, 44, 13, 88, 23, 94, 11, and 39,

  Explain how you arrived at your final solution

Explain how you arrived at your final solution for the four conceptual and process view diagrams that you have created and describe how you created the conceptual and process view for all four (4) diagrams. In the description, be sure to provide a j..

  Explain the importance of electronic software application

Write clearly and concisely about topics related to information systems for decision making using proper writing mechanics and technical style conventions.

  Discuss optimization techniques specific to data warehousing

Demonstrate the basic mechanisms for accessing relational databases from various types of application development environments.

  Sort ascending by consultant id and date opened

Sort ascending by consultant ID and Date Opened. Don't show tickets with category ID of 0. HINT: You will require to use SELECT query with an alias in builder for the column.

  Review the data analysis and consider the coding activities

Review the data analysis and consider the coding activities you have engaged. Consider the kinds of data that would be generated through the data collection techniques anticipated for your qualitative research plan.

  Describe the normal forms violated in the design

Describe the normal forms violated in the following design and fix them to the third normal form.

  Create a few queries that allow you to practice concepts

Create a few queries that allow you to practice concepts from the Lab. Please, don't simply post queries from this week's lab assignment! Post a screenshot of the query design and the results set in a Word document.

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