..1 Ooredoo 10:00 PM 33% 242 7 Query Decomposition and Data Localization Data localization is treated in detail in Ceri and Pelagatti, 1983] for horizontally partitioned relations which are referred to as multirelations. In particular, an algebra of qualified relations is defined as an extension of relation algebra, where a qualified relation is a relation name and the qualification of the fragment. Proofs of correctness and completeness of equivalence transformations between expressions of algebra of qualified relations are also given. The formal properties of horizontal and vertical fragmentation are used in Ceri et al., 1986 to characterize distributed joins over fragmented relations Exercises Problem 7.1. Simplify the following query, expressed in SQL, on our example database using idempotency rules: SELECT ENO FROM ASG WHERE RESP- Analyst AND NOT (PNO-P2" OR DUR-12) AND PNO 12 AND DUR12 Problem 7.2. Give the query graph of the following query, in SQL, on our example database: SELECT ENAME, PNAME FROM EMP, ASG, PROJ WHERE DUR > 12 AND MP. ENOASG. ENO AND PROJ.PNO - ASG.PNO and map it into an operator tree Problem 7.3 (*). Simplify the following query: SELECT ENAME, PNAME FROM H. ASGPROJ WHERE (DUR > 12 OR RESP - "Analyst") ADE . ENO ASG. ENO TITLE="Elect. Eng." ASS.PNO P3) DUR > 12 OR RESP NOT Analyst") AND ASO.PNO - PROJ.PNO and transform it into an optimized operator tree using the restructuring algorithm (Section 7.1.4) where select and project operations are applied as soon as possible to reduce the size of intermediate relations. Problem 7.4 (). Transform the operator tree of Figure 7.5 back to the tree of Figure 7.3 using the restructuring algorithm. Describe each intermediate tree and show which rule the transformation is based on ..1 Ooredoo 10:00 PM 33% 242 7 Query Decomposition and Data Localization Data localization is treated in detail in Ceri and Pelagatti, 1983] for horizontally partitioned relations which are referred to as multirelations. In particular, an algebra of qualified relations is defined as an extension of relation algebra, where a qualified relation is a relation name and the qualification of the fragment. Proofs of correctness and completeness of equivalence transformations between expressions of algebra of qualified relations are also given. The formal properties of horizontal and vertical fragmentation are used in Ceri et al., 1986 to characterize distributed joins over fragmented relations Exercises Problem 7.1. Simplify the following query, expressed in SQL, on our example database using idempotency rules: SELECT ENO FROM ASG WHERE RESP- Analyst AND NOT (PNO-P2" OR DUR-12) AND PNO 12 AND DUR12 Problem 7.2. Give the query graph of the following query, in SQL, on our example database: SELECT ENAME, PNAME FROM EMP, ASG, PROJ WHERE DUR > 12 AND MP. ENOASG. ENO AND PROJ.PNO - ASG.PNO and map it into an operator tree Problem 7.3 (*). Simplify the following query: SELECT ENAME, PNAME FROM H. ASGPROJ WHERE (DUR > 12 OR RESP - "Analyst") ADE . ENO ASG. ENO TITLE="Elect. Eng." ASS.PNO P3) DUR > 12 OR RESP NOT Analyst") AND ASO.PNO - PROJ.PNO and transform it into an optimized operator tree using the restructuring algorithm (Section 7.1.4) where select and project operations are applied as soon as possible to reduce the size of intermediate relations. Problem 7.4 (). Transform the operator tree of Figure 7.5 back to the tree of Figure 7.3 using the restructuring algorithm. Describe each intermediate tree and show which rule the transformation is based on