chapter 3 [ B ] Flashcards
horizontal fragmentation is defined by a selection operation on the _______ of a database schema.
owner relations
A horizontal fragment Ri of relation R consists of all the tuples of R that satisfy a minterm predicate mi.
true
given a set of minterm predicates M, how many horizontal fragments of relation R are there?
same number as the minterm predicates.
set of horizontal fragments is aka _______ ?
minterm fragments.
An important aspect of simple predicates is their _____ and ______ ?
completeness and their minimality
Explain Completeness of predicates?
a set of predicates is considered complete if it can address all access patterns / queries under which tuples from the fragmented relations may need to be accessed.
What is The reason completeness is a desired?
- Fragments are logically uniform
- Fragments are statistically homogeneous in the way applications access them.
______ results in a balanced workload across all the fragments.
Completness
Explain minimality.
means that we only include the essential predicates that impact how we break down a dataset into fragments.
- if a predicate causes a fragment f to be further fragmented into, say, fi and fj, then there should be at least one application that accesses fi and fj differently.
If all the predicates of a set Pr are relevant, Pr is minimal
True
_______ is An iterative algorithm that would generate a complete and minimal set of predicates Pr’ given a set of simple predicates Pr.
COM-MIN
Write down COM-MIN algorithm.
- Input: Set of simple predicates Pr
- Output: Complete & minimal set of predicates Pr’
- Initialize Pr’ as an empty set.
- For each simple predicate p in Pr:
a. Add p to Pr’. - For each pair of distinct minterm predicates mi, mj in Pr’a. Check if mi and mj are identical in their
definitions except for one simple predicate pib. If pi is relevant, Keep both mi and mj in Pr’
c. If pi is not relevant, Remove the less relevant
predicate - Repeat steps 3 until no further changes can be made to Pr’.
- Output Pr’ as the complete and minimal set of predicates.
reduction of minterms can be achieved by _____ ?
eliminating minterms that might be contradictory to a set of implications I.
Give an example of contradicting minterm elimination.
- We have an attribute ‘att’ that can take on values from a set {value_1, value_2}.
Implication
- i1: If ‘att’ is ‘value_1’, then it can’t be ‘value_2’.
- i2: If ‘att’ is not ‘value_1’, then it must be ‘value_2’.
minterms
- m1: (att = value_1) AND (att = value_2)
- m2: ¬(att = value_1) AND (att = value_2)
- m3: (att = value_1) AND ¬(att = value_2)
- m4: ¬(att = value_1) AND ¬(att = value_2)
—> minterm predicates m1 and m4 are contradictory to the implications I
Explain the PHORIZONTAL Algorithm?
Input
- Relation R: Table to be horizontally fragmented.
- Pr: The set of simple predicates
Steps
- Initialize empty set Fragments
- For each simple predicate p in Pra. Create a fragment Fi
- consists of the rows that satisfy the simple
predicate p.
- p is “age > 30,” Fi will contain all rows where
the age is greater than 30. - Add Fi to the Fragments set
- Repeat steps 2-3 for all predicates in Pr
- Output Fragments