14_Query_Decomposition_and_Data_Localization

14_Query_Decomposition_and_Data_Localization - Distributed...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Distributed Database Systems Query Decomposition and Data Localization 605.741 David Silberberg
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
D. Silberberg Distributed Database Systems Overview of Query Processing 2 Query Decomposition • This is the same for central and distributed DBMSs • Normalization – We are manipulating (normalizing) the constraints of the WHERE clause – Relational languages like SQL are quantifier-free – Conjunctive normal form (p1 p2 p3) (p4 p5) (p6) – Disjunctive normal form (p1 p2 p3) (p4 p5) (p6) • Requires many unions, and thus, replicated selections • Conjunction is more efficient, because that is the way queries are generally written
Background image of page 2
D. Silberberg Distributed Database Systems Overview of Query Processing 3 Some Rules • Commutative law –a b b a b b a • Associative law –( a b) c a (b c) a b) c a (b c) • Distributive law (b c) (a b) (a c) (b c) (a b) (a c) • Negation ¬ ( ¬ a) a • DeMorgan's law ¬ (a b) ⇔¬ a ∨¬ b ¬ (a b) a ∧¬ b
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
D. Silberberg Distributed Database Systems Overview of Query Processing 4 Example Decomposition SELECT ENAME FROM EMP, ASG WHERE EMP.ENO = ASG.ENO AND ((RESP = 'Manager' AND DUR = 12) OR NOT (RESP = 'Programmer' OR DUR <> 12)) goes to SELECT ENAME FROM EMP, ASG WHERE EMP.ENO = ASG.ENO AND DUR = 12 AND (RESP = 'Manager' OR RESP <> 'Programmer')
Background image of page 4
D. Silberberg Distributed Database Systems Overview of Query Processing 5 Decomposition Analysis Reject incorrect types & semantically incorrect queries Type incorrectness SELECT PNAME FROM PNO WHERE DUR = 'CAD/CAM' Semantic incorrectness – Reject queries that "don't make sense" – Components do not contribute to the results – This can be done in general for conjunctive queries • No negation or disjunction
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
D. Silberberg
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/23/2009 for the course DBST 663 taught by Professor Tba during the Spring '09 term at MD University College.

Page1 / 21

14_Query_Decomposition_and_Data_Localization - Distributed...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online