All Packages Class Hierarchy This Package Previous Next Index
Class DSRG.VKB.Version
java.lang.Object
|
+----DSRG.VKB.Version
- public class Version
- extends Object
this class is needed to support the QC-Model. It contains a view
definition, and a vector of suggestions for its rewriting after a
certain schema change. Those suggestions are not materialized, but
they have "QC-Values", which are objects of another new class,
called "QC".
-
DEBUG
-
-
definition
-
-
myMKB
-
-
oldDefinition
-
-
qcValues
-
-
w_nonrepl
- the tradeoff parameters for replaceable and non-replaceable
attributes, this will not be in the QC-class.
-
w_repl
- the tradeoff parameters for replaceable and non-replaceable
attributes, this will not be in the QC-class.
-
Version(View_Definition, View_Definition, QC, MKB)
- the constructor creates a version of a view.
-
computeCF_IO()
- compute number of I/O-operations.
-
computeCF_M()
- compute number of messages.
-
computeCF_T()
- Compute number of transferred bytes.
We need to compute
how many bytes are transferred between view site and ISs.
-
computeDDattr()
- compute DDattr from the View Definition
-
computeDDext()
- compute DDext from the ViewDefinitions.
-
computeQV(View_Definition)
- compute Q(V) --- the intermediate value needed to compute
DD_attr
-
getDefinition()
- returns the (SQL-)definition of this version
-
getDefinitionAsObject()
- returns the View_Definition object of this version
-
getOldDefinitionAsObject()
- returns the View_Definition object of the old VD of this
version
-
getQC()
- returns the QC-Object of this version
-
viewSizeEstimate(View_Definition)
- private method to compute the number of tuples in a view (by
multiplying selectivities and relation sizes
DEBUG
private static final boolean DEBUG
oldDefinition
private View_Definition oldDefinition
definition
private View_Definition definition
qcValues
private QC qcValues
w_repl
private double w_repl
- the tradeoff parameters for replaceable and non-replaceable
attributes, this will not be in the QC-class. not sure if
that's good (ask Xin and Elke)
w_nonrepl
private double w_nonrepl
- the tradeoff parameters for replaceable and non-replaceable
attributes, this will not be in the QC-class. not sure if
that's good (ask Xin and Elke)
myMKB
private MKB myMKB
Version
public Version(View_Definition myOldDefinition,
View_Definition myDefinition,
QC myQCValues,
MKB theMKB)
- the constructor creates a version of a view.
computeDDattr
private double computeDDattr()
- compute DDattr from the View Definition
- Returns:
- DDattr-value
computeQV
private double computeQV(View_Definition vd)
- compute Q(V) --- the intermediate value needed to compute
DD_attr
computeDDext
private double computeDDext()
- compute DDext from the ViewDefinitions. For POC without
approximate PC-constraints, it is sufficient to count the
smaller of the two views as overlap. That's all we need. So
we'll just get a size of the view before and after view
synchronization. For the latter, we use the same algo as for
CF_T (for current_no_of_tuples) :)
viewSizeEstimate
private long viewSizeEstimate(View_Definition def)
- private method to compute the number of tuples in a view (by
multiplying selectivities and relation sizes
computeCF_M
private long computeCF_M()
- compute number of messages. Simplified over the paper (the
case of no other relations in the updated IS is not covered,
i.e., we always have twice as many messages as information
sources. The error should be minimal. Maybe I'll fix that
later.
computeCF_T
private long computeCF_T()
- Compute number of transferred bytes.
We need to compute
how many bytes are transferred between view site and ISs. So we
take an update in relation R1, send it to the site of Relation
R2, get the result, and so on. We have to somehow take into
account that several relations can reside in the same IS.
As a simplification, I won't take into account where the update
came from. I will just assume the cost for a complete
recomputation of one tuple of the leftmost relation in the
view. Will be extended later.
computeCF_IO
private long computeCF_IO()
- compute number of I/O-operations. As a first hack, this is the
number of total bytes divided by the blocking factor :)
getDefinitionAsObject
public View_Definition getDefinitionAsObject()
- returns the View_Definition object of this version
getOldDefinitionAsObject
public View_Definition getOldDefinitionAsObject()
- returns the View_Definition object of the old VD of this
version
getDefinition
public String getDefinition()
- returns the (SQL-)definition of this version
getQC
public QC getQC()
- returns the QC-Object of this version
All Packages Class Hierarchy This Package Previous Next Index