
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is an Expression Tree in DBMS
Expression tree is also called a query tree. It demonstrates an evaluation plan.
Example
Consider an evaluation plan for the given query −
Select name from customer, account where customer.name=account.name and account.balance>2000;
There are two evaluation plans −
Πcustomer.name(σcustomer.name=account.name^ account.balance>2000(customerXaccount)
Πcustomer.name(σcustomer.name=account.name(customerXσ account.balance>2000(account)
The expression trees for the above evaluation plans are as follows −
Cost evaluator evaluates the cost of different evaluation plans and chooses the evaluation plan with lowest cost. Disk access time, CPU time, number of operations, number of tuples, size of tuples are considered for cost calculations.
Advertisements