








































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!









































ļ¼ What is Query? ļ¼ What is Query Processor? ļ¼ Main Function of a Query Processor ļ¼ Main Problems of Query Processing ļ¼ Characteristics of Query Processor ļ¼ Main layers of Query Processing ļ¼ Query Decomposition ļ¼ Data Localization ļ¼ Global Query Optimization ļ¼ Distributed Execution
ļ In relational database technology, users perform the task of data processing and data manipulation with the help of high- level non-procedural language (e.g. SQL). ļ This high-level query hides the low-level details from the user about the physical organization of the data and presents such an environment so that the user can handle the tasks of even complex queries in an easy, concise and simple fashion. ļ The inner procedure of query-task is performed by a DBMS module called a Query Processor. Hence the users are relieved from query optimization which is a time- consuming task that is actually performed by the query processor.
ļ Understanding Query processing in distributed database environments is very difficult instead of centralized database, because there are many elements or parameters involved that affect the overall performance of distributed queries. Moreover, in distributed environment, the query processor may have to access in many sites. Thus, query response time may become very high. ļ That is why, Query processing problem is divided into several sub-problems/ steps which are easier to solve individually.
ļ Main problem of query processing is query optimization. ļ It is a time consuming task, because many execution strategies are involved to minimize (optimize) computer recourse consumption. ļ Total cost also affects query processing. Cost depends on the time required for processing operations of the query at various sites, utilization of various computer resources etc, time needed for exchanging data between sites participating in the execution of the query etc. ļ Time and space required to process the query is also an important factor for the performance of the query processing.
ļ Languages ļ Types of Optimization ļ Optimization Timing ļ Statistics ļ Decision Sites ļ Exploitation of the Network Topology ļ Exploitation of Replicated Fragments ļ Use of Semi-join
Types of Optimization: ļ Among all possible strategies for executing query, the one in which less time and space are required is the best solution for the optimization of query. ļ A comparative study for all the strategies should perform such that how much cost will be required for each solution. That strategy should be chosen in which there will be less cost. But keep in mind that choosing the low-cost strategy may require much space. So care should be taken in this case also.
Optimization Timing: ļ The actual time required to optimize the execution of a query is an important factor. If less time is required, then it is the best solution for query processing.
Decision Sites: ļ In a distributed database, several sites may participate for answering the query. Most systems use centralized decision approach, in which a single site generates the strategy. However, the decision process could be distributed among various sites. Exploitation of Network Topology: ļ Distributed query processor uses computer network, so its performance depends also on which topology it is using. The cost function, speed, utilization of various network resources are important factors for executing query processor in a distributed environment.
Exploitation of Replicated Fragments: ļ A distributed relation is usually divided into relation fragments. ļ Distributed queries expressed on global relations are mapped into queries on physical fragments of relations by translating relations into fragments. We call this process localization because its main function is to localize the data involved in the query. ļ For higher reliability and better read performance, it is useful to have fragments replicated at different sites.
ļ Processing of Query in distributed DBMS instead of centralized (Local) DBMS. ļ Understanding Query processing in distributed database environments is very difficult instead of centralized database, because there are many elements involved. ļ So, Query processing problem is divided into several sub- problems/ steps which are easier to solve individually. ļ A general layering scheme for describing distributed query processing is given below:
Query processing involves 4 main layers:
ļ The input is a query on global data expressed in relational calculus. This query is posed on global (distributed) relations, meaning that data distribution is hidden. ļ The first three layers map the input query into an optimized distributed query execution plan. They perform the functions of query decomposition, data localization, and global query optimization. ļ Query decomposition and data localization correspond to query rewriting. ļ The first three layers are performed by a central control site and use schema information stored in the global directory. ļ The fourth layer performs distributed query execution by executing the plan and returns the answer to the query. It is done by the local sites and the control site.
ļ The first layer decomposes the calculus query into an algebraic query on global relations. The information needed for this transformation is found in the global conceptual schema describing the global relations. ļ Both input and output queries refer to global relations, without knowledge of the distribution of data. Therefore, query decomposition is the same for centralized and distributed systems. ļ Query decomposition can be viewed as four successive steps: ļ 1 ) Normalization, 2 ) Analysis, 3 ) Elimination of redundancy, and 4 ) Rewriting.