Query processing in Distributed Database
Query processing problem
The query processing is translating high level query into low level query. Where high level query is relational calculus and low level is relational plus communication operators.
The query where there is join is used will be the good query. And in which the Cartesian product is used used is bad query.
The query must achieve both correctness and efficiency.
The main purpose is to chose the best relational algebra among the equivalent ones.
The measure of the cost inquired in query is time response of the query.
And resource consumption. The first is CPU ,I/o and communication operators.They have to be minimized.
Complexity of relational algebra operators:
we consider relational algebra as output of a query processor. The relational algebra operators that affect the out put of a queryt. The complexity can be defined in terms of relational cardinalities independent of physical implementation as storage and fragmentation.
The unary and binary operators complexity, where unary operator n denotes relational cardinality.
Operator cardinalities gives two principles. The first is that the selection is used first that reduces cardinalities.Second operator must be used in increasing complexity order to avoid relational cardinalities.
Query Decomposition:
Query decomposition has four steps.
First Calculus query is written in normalized form. That involves the manipulation of the query with logical operators
Second Normalized query is analyzed so the query is accepted or rejected
Third is to the query is simplified. Where the predicates are eliminated.
Fourth is query is restructured.
Query Localization:
Layer is to localize the query.Relations are stored in fragments and sites called fragmentation. A global relation can be reconstructed by applying the fragmentation rule and running a program called query localization.
This can be done by query is mapped into fragment query by substituting each relation by reconstruction.
Second the fragment query is simplified and reconstructed to produce good query.
Global query optimization:
Goal is to find execution strategy that is close to optimization.
To find the best ordering of the operator in the query. Including communication operators that minimizes a cost function. Cost function is time resources that refers to the I/O, CPU cost.
generally they are not accessed by the users when they are parsed. Queries result are generated by accessing relevant address data and manipulating it.
Query Execution:
Each sub query executing at one site is called local query.
Is then optimized using local schema.
.
The query processing is translating high level query into low level query. Where high level query is relational calculus and low level is relational plus communication operators.
The query where there is join is used will be the good query. And in which the Cartesian product is used used is bad query.
Bad Cartesian product is used
Good Cartesian product is not used, join is used
The query must achieve both correctness and efficiency.
The main purpose is to chose the best relational algebra among the equivalent ones.
The measure of the cost inquired in query is time response of the query.
And resource consumption. The first is CPU ,I/o and communication operators.They have to be minimized.
Complexity of relational algebra operators:
we consider relational algebra as output of a query processor. The relational algebra operators that affect the out put of a queryt. The complexity can be defined in terms of relational cardinalities independent of physical implementation as storage and fragmentation.
The unary and binary operators complexity, where unary operator n denotes relational cardinality.
Operator cardinalities gives two principles. The first is that the selection is used first that reduces cardinalities.Second operator must be used in increasing complexity order to avoid relational cardinalities.
Query Decomposition:
Query decomposition has four steps.
First Calculus query is written in normalized form. That involves the manipulation of the query with logical operators
Second Normalized query is analyzed so the query is accepted or rejected
Third is to the query is simplified. Where the predicates are eliminated.
Fourth is query is restructured.
Query Localization:
Layer is to localize the query.Relations are stored in fragments and sites called fragmentation. A global relation can be reconstructed by applying the fragmentation rule and running a program called query localization.
This can be done by query is mapped into fragment query by substituting each relation by reconstruction.
Second the fragment query is simplified and reconstructed to produce good query.
Global query optimization:
Goal is to find execution strategy that is close to optimization.
To find the best ordering of the operator in the query. Including communication operators that minimizes a cost function. Cost function is time resources that refers to the I/O, CPU cost.
generally they are not accessed by the users when they are parsed. Queries result are generated by accessing relevant address data and manipulating it.
Query Execution:
Each sub query executing at one site is called local query.
Is then optimized using local schema.
.
Comments
Post a Comment