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".


Variable Index

 o DEBUG
 o definition
 o myMKB
 o oldDefinition
 o qcValues
 o w_nonrepl
the tradeoff parameters for replaceable and non-replaceable attributes, this will not be in the QC-class.
 o w_repl
the tradeoff parameters for replaceable and non-replaceable attributes, this will not be in the QC-class.

Constructor Index

 o Version(View_Definition, View_Definition, QC, MKB)
the constructor creates a version of a view.

Method Index

 o computeCF_IO()
compute number of I/O-operations.
 o computeCF_M()
compute number of messages.
 o computeCF_T()
Compute number of transferred bytes.
We need to compute how many bytes are transferred between view site and ISs.
 o computeDDattr()
compute DDattr from the View Definition
 o computeDDext()
compute DDext from the ViewDefinitions.
 o computeQV(View_Definition)
compute Q(V) --- the intermediate value needed to compute DD_attr
 o getDefinition()
returns the (SQL-)definition of this version
 o getDefinitionAsObject()
returns the View_Definition object of this version
 o getOldDefinitionAsObject()
returns the View_Definition object of the old VD of this version
 o getQC()
returns the QC-Object of this version
 o viewSizeEstimate(View_Definition)
private method to compute the number of tuples in a view (by multiplying selectivities and relation sizes

Variables

 o DEBUG
 private static final boolean DEBUG
 o oldDefinition
 private View_Definition oldDefinition
 o definition
 private View_Definition definition
 o qcValues
 private QC qcValues
 o 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)

 o 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)

 o myMKB
 private MKB myMKB

Constructors

 o Version
 public Version(View_Definition myOldDefinition,
                View_Definition myDefinition,
                QC myQCValues,
                MKB theMKB)
the constructor creates a version of a view.

Methods

 o computeDDattr
 private double computeDDattr()
compute DDattr from the View Definition

Returns:
DDattr-value
 o computeQV
 private double computeQV(View_Definition vd)
compute Q(V) --- the intermediate value needed to compute DD_attr

 o 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) :)

 o viewSizeEstimate
 private long viewSizeEstimate(View_Definition def)
private method to compute the number of tuples in a view (by multiplying selectivities and relation sizes

 o 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.

 o 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.

 o 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 :)

 o getDefinitionAsObject
 public View_Definition getDefinitionAsObject()
returns the View_Definition object of this version

 o getOldDefinitionAsObject
 public View_Definition getOldDefinitionAsObject()
returns the View_Definition object of the old VD of this version

 o getDefinition
 public String getDefinition()
returns the (SQL-)definition of this version

 o getQC
 public QC getQC()
returns the QC-Object of this version


All Packages  Class Hierarchy  This Package  Previous  Next  Index