What is an expression tree in DBMS?

DBMSDatabaseBig Data Analytics

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.namecustomer.name=account.name^ account.balance>2000(customerXaccount)

  • Πcustomer.namecustomer.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.

raja
Published on 06-Jul-2021 13:43:42
Advertisements