






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Strategies for Query Processing: Translating SQL Queries into Relational Algebra and Other Operators, Algorithms for External Sorting, Algorithms for SELECT Operation, Implementing the JOIN Operation, Algorithms for PROJECT and Set Operations, Implementing Aggregate Operations and Different Types of JOINs, Combining Operations Using Pipelining, Parallel Algorithms for Query Processing. (Text1: 18.1 to 18.8)
18.1 Translating SQL Queries into Relational Algebra and Other Operators 18.1.1 Additional Operators Semi-Join and Anti-Join Consider a slightly modified version of the schema in Figure 5.5 as follows: EMPLOYEE ( Ssn, Bdate, Address, Sex, Salary, Dno) DEPARTMENT ( Dnumber, Dname, Dmgrssn, Zipcode) where a department is located in a specific zip code. Let us consider the following query: Here we have a nested query which is joined by the connector IN. To remove the nested query: is called as unnesting. It leads to the following query with an operation called semi-join, which we show with a non-standard notation “S=” below: In algebra, alternate notations exist. One common notation is shown in the following figure. QUERY: query counts the number of employees who do not work in departments located in zip code 30332
(2 * b) + (2 * b * (logdM nR))
Compared to a conjunctive selection condition, a disjunctive condition (where simple conditions are connected by the OR logical connective rather than by AND) is much harder to process and optimize.
Information in the Database Catalog. A typical RDBMS catalog contains the following types of information:
➢ The collection of records with the same value of h(A) are placed in the same partition, which is a hash bucket in a hash table in main memory. In the second phase, called the probing phase
For example , the left outer join operation shown above is equivalent to the following sequence of relational operations: 2) Implementing Semi-Join and Anti-Join. ➢ The purpose is to be able to perform some variant of join instead of evaluat ing the subquery multiple times. 3) Implementing Non-Equi-Join ➢ we referred to this operation as theta-join. This functionality is based on a condition involving any operators, such as , ≥, ≤, ≠, and so on.
18.7.1 Iterators for implementing Physical Operations Various algorithms for algebraic operations involve reading some input in the form of one or more files, processing it, and generating an output file as a relation. If the operation is implemented in such a way that it outputs one tuple at a time, then it can be regarded as an iterator The iterator interface typically consists of the following methods: