ECE356 Lecture Notes - Lecture 19: Mcgraw-Hill Education, Population Pyramid, Relational Algebra

33 views6 pages

Document Summary

Given an understanding of the various rules, there are now some clear ways we can transform an input query to determine which of the equivalent representations will have the lowest cost of execution. Suppose our query involves a selection and a join: we want to select the employee number, salary, and address for an employee with an id of 385. Suppose number and salary are in the employee table with 300 entries, and the address information is in another table with 12000 entries. We have a join query, and if we do this badly, we will compute the join of employees and addresses, producing some 300 results, and then we need to do a selection and a projection on that intermediate relation. If done e ciently, we will do the selection and projection rst, meaning the join needs to match exactly one tuple of employees rather than all 300.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents