The present invention relates to the dependency propagation problem for conditional functional dependencies (CFDs) and, more particularly, to methods and apparatus for computing a propagation cover for conditional functional dependencies.
The World Wide Web makes it possible to exchange and integrate data on an unprecedented scale. A natural question in connection with data exchange and integration concerns whether dependencies that hold on data sources still hold on the target data (i.e., data transformed via mapping from the sources). As dependencies (often referred to as integrity constraints) specify a fundamental part of the semantics of the data, one wants to know whether or not the dependencies are propagated from the sources via the mapping, i.e., whether the mapping preserves information.
The dependency propagation problem determines, given a view (mapping) defined on data sources and dependencies that hold on the sources, whether or not another dependency is guaranteed to hold on the view. The dependencies defined on the sources are referred to as source dependencies, and those on the view are referred to as as view dependencies.
The dependency propagation problem has been extensively studied when source and view dependencies are functional dependencies (FDs), for views defined in relational algebra. It has been found that while many source FDs may not hold on the view as they are, they do hold on the view under conditions. In other words, source FDs are indeed propagated to the view, not as standard FDs but as FDs with conditions. The FDs with conditions are in the form of conditional functional dependencies (CFDs). See, U.S. patent application Ser. No. 12/411,935, filed Mar. 26, 2009, entitled “Methods and Apparatus for Identifying Conditional Functional Dependencies,” incorporated by reference herein. While the implication and consistency problems for CFDs are addressed, the propagation problem is not considered.
A need therefore exists for methods and apparatus for computing a propagation cover for conditional functional dependencies.
Generally, methods and apparatus are provided for propagating functional dependencies with conditions. According to one aspect of the invention, propagation covers are computed using an SPC view of a dataset (an SPC view comprises Selection, Projection and Cartesian product operations). The exemplary method comprises the steps of: obtaining a plurality of conditional functional dependencies defined over a schema for the dataset, such as a minimal cover of conditional functional dependencies; processing one or more of the selection operations in the SPC view to extract one or more equivalence classes; processing one or more of the Cartesian product operations in the SPC view to obtain a renamed set of the plurality of conditional functional dependencies, wherein the renamed set comprise conditional functional dependencies having attributes appearing in the SPC view; applying one or more domain constraints from the one or more equivalence classes to the renamed set to remove one or more attributes not in the SPC view; processing one or more of the projection operations in the SPC view using a reduction by resolution procedure to identify one or more inferences that can be propagated to the SPC view from the one or more conditional functional dependencies having attributes that do not appear in the SPC view; converting one or more domain constraints of the equivalence classes to conditional functional dependencies; and determining a cover of the SPC view, such as a minimal cover of the SPC view.
According to additional aspects of the invention, a test is performed to determine if two or more of the conditional functional dependencies are inconsistent. If there are one or more inconsistencies in the equivalence classes, at least one set of conflicting conditional functional dependencies is returned.
A more complete understanding of the present invention, as well as further features and advantages of the present invention, will be obtained by reference to the following detailed description and drawings.
The present invention provides methods and apparatus for computing a propagation cover. The disclosed algorithms determine whether a given view dependency is propagated from source dependencies, and find a cover of all view dependencies propagated via SPC views. For a more detailed discussion of the complexity and experimental results of the algorithms described herein, see, W. Fan et al., “Propagating Functional Dependencies with Conditions,” Proc. of Very Large Data Bases (VLDB) '08 (August 2008), incorporated by reference herein.
Consider three data sources R1, R2 and R3, containing information about customers in the United Kingdom (UK), United States (US) and the Netherlands, respectively. It is assumed that these data sources have a uniform schema:
Consider the following FDs defined on the UK and Netherland sources: in instances of Ri, zipcode uniquely determines street (f1), and area code uniquely determines city (f2); moreover, area code determines city in R3 data (f3)
Define a view V with query Q1 ∪ Q2 ∪ Q3 to integrate the data from the three sources, where Q1 is
select AC, phn, name, street, city, zip, ‘44’ as CC from R1
Define Q2 and Q3 by substituting ‘01’ and ‘31’ for ‘44’, R2 and R3 for R1 in Q1, respectively. The target schema R has all the attributes in the sources and a country-code attribute CC (44, 01, 31 for the UK, US and Netherlands, respectively).
As shown in
Similarly, from f2 and f3 one cannot derive a standard FD on the view to assert that “area code uniquely determines city.” Indeed, from tuples t1 and t5 in
That is, f2 and f3 hold conditionally on the view: area code determines city for tuples with CC=‘44’ (φ2) or CC=‘31’ (φ3). In other words, the semantics specified by the FDs on the sources is preserved by the CFDs on the view.
Furthermore, given the following CFDs on the sources:
φ4: R([CC=‘44,’ AC=‘20’]→[city=‘ldn’]),
φ5: R([CC=‘31,’ AC=‘20’]→[city=‘Amsterdam’]),
which carry patterns of semantically related constants.
It is submitted that no previous algorithms developed for FD propagation are capable of deriving these CFDs from the given source FDs via the view. This highlights the need for investigating dependency propagation, for CFDs as view dependencies.
The present invention can be employed in a number of exemplary applications:
(1) Data Exchange. Recall Example 1.1. Suppose that the target schema R and CFDs φ2 and φ3 are predefined. Then, the propagation analysis assures that the view definition V is a schema mapping from (R1, R2, R3) to R, i.e., for any source instances D1 and D3 of R1 and R3 that satisfy the FDs f2 and f3, respectively, and for any source instance D2 of R2, the view V(D1, D2, D3) is an instance of the target schema R and is guaranteed to satisfy φ2 and φ3.
(2) Data Integration. Suppose that V is a mapping in an integration system, which defines a global view of the sources. Then, certain view updates, e.g., insertion of a tuple t with CC=‘44,’ AC=‘20’ and city=‘edi,’ can be rejected without checking the data, since it violates the CFD φ4 propagated from the sources.
(3) Data Cleaning. In contrast to FDs that were developed for schema design, CFDs have been proposed for data cleaning. Suppose that CFDs φ1-φ5 are defined on the target database, for checking the consistency of the data. Then, propagation analysis assures that one need not validate these CFDs against the view V. In contrast, if in addition, an FD φ6: R(CC, AC, phn→street, city, zip) is also defined on the target, then φ6 has to be validated against the view since it is not propagated from the source dependencies.
Views are generally expressed in various fragments of relational algebra (RA), and source dependencies are generally expressed either as traditional FDs or CFDs. It has been found that in many cases CFD propagation retains the same complexity as its FD counterpart, but in some cases CFDs do incur extra complexity. The dependency propagation problem is considered in the presence of finite-domain attributes.
According to one aspect of the present invention, algorithms are provided for computing a propagation cover. In many applications, one wants not only to know whether a given view dependency is propagated from source dependencies, but also to find a cover of all view dependencies propagated. From the cover, all view dependencies can be deduced via implication analysis. This is needed for, e.g., processing view updates and detecting inconsistencies, as shown by the data integration and data cleaning examples given above.
Even for certain FDs and views defined with a single projection operator, a minimal cover of all view FDs propagated is sometimes necessarily exponentially large, in the infinite-domain setting. A typical method to find a cover is by first computing the closure of all source FDs, and then projecting the closure onto the view schema. While this method always takes exponential time, it is the algorithm recommended by database textbooks.
Already hard for FDs and projection views, the propagation cover problem is intriguing for CFDs and SPC views. The present invention provides an algorithm to compute a minimal cover of CFDs propagated via SPC views in the absence of finite-domain attributes, by extending a practical algorithm proposed in S. Gottlob, “Computing Covers for Embedded Functional Dependencies,” Proc. of Principles of Database Systems (PODS) (1987), incorporated by reference herein and hereinafter referred to as Gottlob 1987, for computing a cover of FDs propagated via projection views. Despite the increased expressive power of CFDs and SPC views, the disclosed algorithm has approximately the same complexity as the algorithm of Gottlob 1987. The disclosed algorithm behaves polynomially in many practical cases. Indeed, exponentially large covers are mostly found in examples intentionally constructed. Further, from this algorithm, an effective polynomial-time heuristic is immediate: it computes a minimal cover when the cover is not large, and returns a subset of a cover as soon as the computation reaches a predefined bound, when covers are inherently large.
The present invention thus computes minimal propagation covers via SPC views, for FDs or CFDs.
Conditional Functional Dependencies
CFDs extend FDs by incorporating a pattern tuple of semantically related data values. For each attribute A in a schema R, its associated domain is denoted as dom(A), which is either infinite (e.g., string, real) or finite (e.g., Boolean, date ).
Definition 2.1: A CFD φ on a relation schema R is a pair R (X→Y, tp), where (1) X→Y is a standard FD, called the FD embedded in φ; and (2) tp is a tuple with attributes in X and Y, referred to as the pattern tuple of φ, where for each A in X (or Y), tp[A] is either a constant ‘a’ in dom(A), or an unnamed variable ‘_’ that draws values from dom(A). The X and Y attributes in tp are separated with ‘∥’.
For CFDs on views (i.e., view CFDs) a special form R(A→B,(x ∥x)) is allowed, where A, B are attributes of R and x is a (special) variable.
Note that traditional FDs are a special case of CFDs, in which the pattern tuples consist of ‘_’ only.
The dependencies discussed above can be expressed as CFDs, such as:
φ1: R([CC, zip]→[street], (44, _∥_)),
φ2: R([CC, AC]→[city], (44, _∥_)),
φ4: R([CC, AC]→[city], (44, 20∥ldn)),
f
1: R1(zip→street, (_∥_)).
The standard FD f1 on source R1 is expressed as a CFD.
The semantics of CFDs is defined in terms of a relationon constants and ‘_’: η1η2 if either η1=η2, or one of η1,η2 is ‘_’. The operatornaturally extends to tuples, e.g., (Portland, LDN)(_, LDN) but (Portland, LDN)(_, NYC). A tuple t1 matches t2 if t1t2.
An instance D of R satisfies φ=R(X→Y, tp), denoted by D|=φ, if for each pair of tuples t1,t2 in D, if t1[X]=t2[X]tp[X], then t1[Y]tp[Y].
Intuitively, φ is a constraint defined on the set Dφ={t|t ∈ D,t[X]tp[X]} such that for any t1,t2 ∈ Dφ, if t1[X]=t2[X], then (a) t1[Y]=t2[Y], and (b) t1[Y]tp[Y]. Here, (a) enforces the semantics of the embedded FD, and (b) assures the binding between constants in tp[Y] and constants in t1[Y]. Note that φ is defined on the subset Dφ of D identified by tp[X], rather than on the entire D.
An instance D of R satisfies CFD R(A→B,(x∥x)) if for any tuple t in D, t[A]=t[B]. As discussed further below, these CFDs are used to express selection conditions of the form A=B in a view definition, treating domain constraints and CFDs in a uniform framework.
An instance D of a relational schema R satisfies a set Σ of CFDs defined on R, denoted by D|=Σ, if D|=φ for each φ in Σ.
Recall the view definition V from Example 1.1, and the instances D1,D2,D3 of
View Definitions
The present invention addresses dependency propagation for views expressed in various fragments of RA. The problem is already undecidable for FDs and views defined in RA. Consider a relational schema R=(S1, . . . , Sm).
SPC. An SPC query (also referred to as a conjunctive query) Q on R is an RA expression defined in terms of the selection (σ), projection (π), Cartesian product (×) and renaming (ρ) operators. It can be expressed in the following normal form:
πY(Rc×Es), where Es=σF(Ec), Ec=R1× . . . ×Rn,
where (a) Rc={(A1:a1, . . . , Am:am)}, a constant relation, such that for each i ∈ [1,m], Ai is in Y, Ai's are distinct, and ai is a constant in dom(Ai); (b) for each j ∈ [1,n], Rj is ρj(S) for some relation atom in R, and ρj is a renaming operator such that the attributes in Rj and Rl are disjoint if j≠l, and Ai does not appear in any Rj; (c) F is a conjunction of equality atoms of the form A=B and A=‘a’ for a constant a ∈ dom(A).
Fragments of SPC are also considered, denoted by listing the operators supported: S, P, C, SP, SC, and PC (the renaming operator is included in all these subclasses by default without listing it explicitly). For instance, SC is the class of queries defined with σ, × and ρ operators.
For example, Q1 given in Example 1.1 can be expressed as a C query: (CC: 44)×R1.
SPCU. SPCU (also referred to as a union of conjunctive queries) is an extension of SPC by allowing union (∪). An SPCU query defined on R can be expressed in normal form V1 ∪ . . . ∪ Vn, where Vi's are union-compatible SPC queries. For example, the view V given in Example 1.1 is an SPCU query.
As indicated above, the present invention provides methods and appartus for computing a propagation cover. The disclosed algorithms determine whether a given view dependency is propagated from source dependencies, and find a cover of all view dependencies propagated. In other words, aspects of the present invention find a minimal cover of all view CFDs propagated from source CFDs.
The disclosed exemplary algorithm for finding a propagation cover also readily provides a solution for determining whether a given CFD φ is propagated from a given set Σ of source CFDs via an SPC view V: one can compute a minimal cover Γ of all CFDs propagated from Σ via V, and then check whether Γ implies φ.
The disclosed exemplary algorithm for finding a propagation cover is an extension of a practical algorithm proposed in Gottlob 1987, for computing covers of FDs propagated via projection views. The disclosed exemplary algorithm has the same complexity as that of Gottlob 1987, and behaves polynomially in many practical cases. The disclosed exemplary algorithm also yields an algorithm for computing propagation covers when FDs are source dependencies, a special case.
The absence of finite-domain attributes is assumed, the same setting as the classical work on FD propagation. In this setting, the emptiness problem for CFDs and SPC views, and the CFD propagation problem via SPC views are all in ptime. Without loss of generality, CFDs are considered in the normal form: (R: X→A,tp), where A is a single attribute. Indeed, each CFD of the general form given int the section entitled “Dependences and Views,” can be converted in linear time to an equivalent set of CFDs in the normal form.
Propagation Cover Problem
Implication and Cover. A set Σ of CFDs defined on a schema R implies another CFD φ on R, denoted by Σ|=φ, if for any instance D of R, if D|=Σ then D|=φ.
A cover of a set Σ of CFDs is a subset Σc of Σ such that for each CFD φ in Σ, Σc|=φ. In other words, Σc is contained in, and is equivalent to, Σ. For example, recall the notion of the closure F+ of a set F of FDs, which is needed for designing normal forms of relational schema. Then, F is a cover of F+.
A minimal cover Σmc of Σ is a cover of Σ such that
That is, there is neither redundant attributes in each CFD nor redundant CFDs in Σmc.
Only nontrivial CFDs are included in Σmc. A CFD R(X→A, tp) is nontrivial if either (a) A ∉ X, or (b) X=AZ but tp is not of the form (η1,
It is known that without finite-domain attributes, implication of CFDs can be decided in quadratic time. Further, there is an algorithm referred to as MinCover that computes Σmc in O(|Σ|3) time for any given set Σ of CFDs. See, U.S. patent application Ser. No. 12/411,935, filed Mar. 26, 2009, entitled “Methods and Apparatus for Identifying Conditional Functional Dependencies,” incorporated by reference herein.
Propagation Cover. For a view V defined on a schema R and a set Σ of source CFDs on R, CFDp(Σ,V) denotes the set of all view CFDs propagated from Σ via
The propagation cover problem is to compute, given V and Σ, a cover Γ of CFDp(Σ,V). Γ is referred to as a propagation cover of Σ via V, and as a minimal propagation cover if Γ is a minimal cover of CFDp(Σ,V).
Challenges. The following example shows that the problem is already hard for FDs and P views.
Consider a schema R with attributes Ai, Bi, Ci and D, and a set Σ of FDs on R consisting of Ai→Ci, Bi→Ci, and C1, . . . , Cn→D, for each i ∈ [1,n]. Consider a view that projects an R relation onto their Ai,Bi and D attributes, dropping Ci's. Then, any cover Σc of the set of view FDs propagated necessarily contains all FDs of the form η1, . . . , ηn→D, where ηi is either Ai or Bi for i ∈ [1, n]. Σc contains at least 2n FDs, whereas the size of the input, namely, Σ and the view, is O(n). Indeed, to derive view FDs from C1, . . . , Cn→D, one can substitute either Ai or Bi for each Ci, leading to an exponential blowup.
In contrast, the dependency propagation problem is in ptime in this setting (See, e.g.,
The computation of embedded FDs computes a propagation cover of FDs via projection views. Given a schema R, a set F of FDs on R and a set Y of attributes in R, it is to find a cover Fc of all FDs propagated from F via a projection view πY(R). An algorithm for finding Fc is by first computing the closure F+of F, and then projecting F+ onto Y, removing those FDs with attributes not in Y. This algorithm takes O(2|F|) time, for computing F+.
The propagation cover problem is more intricate for CFDs and SPC views.
(a) While at most exponentially many FDs can be defined on a schema R, there are possibly infinitely many CFDs. Indeed, there are infinitely many CFDs of the form R(A→B,tp) when tp[A] ranges over values from an infinite dom(A).
(b) While AX→A is a trivial FD and can be ignored, φ=R(AX→A,tp) may not be ignored. Indeed, when tp is (_,
(c) While X→Y and Y→Z yield X→Z for FDs. the transitivity rule for CFDs has to take pattern tuples into account and is more involved than its FD counterpart.
(d) Selection and Cartesian product introduce interaction between domain constraints and CFDs, a complication of SPC views not encountered when dealing with projection views.
Propagating CFDs via SPC Views
The exponential complexity of Example 3.1 is for the worst case and is only found in examples intentionally constructed. In practice, it is common to find a propagation cover of polynomial size, and thus it may be an overkill to use algorithms that always take exponential time. Thus, an algorithm is needed for computing minimal propagation covers that behaves polynomially most of the time, whereas it necessarily takes exponential time only when all propagation covers are exponentially large for a given input. The present invention provides an algorithm, referred to as PropCFD SPC, that extends the algorithm of Gottlob 1987 for computing a propagation cover of FDs via projection views. Given an SPC view V defined on a schema R, and a set Σ of source CFDs on R, the disclosed PropCFD SPC computes a minimal propagation cover Γ of Σ via V, without increasing the complexity of the extended algorithm, although CFDs and SPC views are more involved than FDs and P views, respectively.
Before PropCFD SPC is presented, some basic results are provided. Let R=(S1, . . . , Sm) be the source schema. Recall from the section entitled “Depencies and Views” that V defined on R is of the form:
πY(Rc×Es), Es=σF(Ec), Ec=R1× . . . ×Rn
where Rc is a constant relation, Rj's are renamed relation atoms ρj(S) for S in R, Y is the set of projection attributes, and F is a conjunction of equality atoms.
Basic Results. The constant relation Rc introduces no difficulties: for each (Ai:ai) in Rc, a CFD RV(Ai→Ai,(_∥a)) is included in Γ, where RV is the view schema derived from V and R. Thus, it is assumed that V=πY(Es).
The reduction below allows a focus on Es instead of V.
Proposition 3.1: For any SPC view V of the form above, and any set Σ of source CFDs, Σ|=Vφ iff Σ|=E
Consider the interaction between CFDs and operators ×,σ and π in the view definition V.
Cartesian Product. Observe that each Rj in Ec is ρj(S), where S is in R. All source CFDs on S are propagated to the view, after their attributes are renamed via ρj.
Selection. The condition F in σF brings domain constraints into play, which can be expressed as CFDs.
Lemma 3.2: (a) If A=‘a’ is in the selection condition F, then RV(A→A,(_∥a)) is in CFDp(Σ,V). (b) If A=B is in F, then RV(A→B,(x∥x)) is in CFDp(Σ,V) for the special variable x.
That is, one can incorporate domain constraints A=‘a’ and A=B enforced by the view V into CFDs. Here (a) asserts that the A column of the view contains the same constant ‘a’, and (b) asserts that for each tuple t in the view, t[A] and t[B] are identical, as required by the selection condition F in the view V (this is why CFDs of the form RV(A→B,(x∥x)) were introduced in the section entitled “Dependencies and Views”).
Lemma 3.3: If RV(A→B,(x∥x)) and RV(BX→G,tp), then RV(AX→G,tp′) is in CFDp(Σ,V), where tp′[A]=tp[B], tp′[X]=tp[X] and tp′[G]=tp[G].
That is, view CFDs can be derived by applying the domain constraint A=B: substituting A for B in a view CFD yields another view CFD. This also demonstrates how domain constraints interact with CFD propagation.
Σd denotes these CFDs as well as those in Σ expressing domain constraints. Based on Σd, it can be decided whether A=B or A=‘a’ for attributes in Y (i.e., RV).
More specifically, the attributes are partitioned into a set EQ of equivalence classes, such that for any eq ∈ EQ, and for any attributes A,B in Y, (a) A, B ∈ eq iff A=B can be derived from Σd; (b) if A=‘a’ can be derived from Σd and moreover, A ∈ eq, then for any B ∈ eq, B=‘a’; the constant ‘a’ as is key of eq, denoted by key(eq). If a constant is not available, key(eq) is ‘_’.
The use of EQ helps decide whether or not V and Σ always yield empty views, which happens if there exists some eq ∈ EQ such that key(eq) is not well-defined, i.e., when two distinct constants are associated with eq.
A procedure is provided to compute EQ, referred to as ComputeEQ, which takes Σ and V as input, and returns EQ as output, along with key(eq) for each eq ∈ EQ. If key(eq) is not well-defined for some eq, it returns a special symbol ‘’, indicating the inconsistency in V and Σ.
Projection. To remedy the limitations of closure-based methods for computing propagation covers of FDs via P views, Gottlob 1987 proposed a practical algorithm based on the idea of Reduction by Resolution (RBR). RBR and the algorithm of Gottlob 1987 are extended herein to handle CFDs and projection.
To illustrate RBR, a partial order ≦ is we first defined on constants and ‘_’: η1≦η2 if either η1 and η2 are the same contant ‘a’, η2=‘_’.
Given CFDs φ1=R(X→A,tp) and φ2=R(AZ→B,tp′), if tp[A]≦tp′[A] and for each C ∈ X ∩ Z, tp[C]tp′[C] , then φ=R(XZ→B,sp) can be derived based on CFD implication (See, U.S. patent application Ser. No. 12/411,935, referenced above). Here, sp=(tp[X] ⊕ tp′[Z]∥tp′[B]), and tp[X] ⊕ tp′[Z] are defined as follows:
Following Gottlob 1987, φ is referred to as an A-resolvent of φ1 and φ2.
Consider CFDs φ=R([A1,A2]→A,t1) and φ2=R([A,A2,B1]→B,t2), where t1=(_,c∥a) and t2=(_,c,b∥_). Then, φ=R([A1,A2,B1]→B,tp) is an A-resolvent of φ1 and φ2, where tp=(_,c,b∥_).
Following Gottlob 1987, the following are defined. Given πY (R) and a set Σ of CFDs on R, let U be the set of attributes in R.
Then, the following result is provided, in which F+ denotes the closure of F, i.e., the set of all CFDs implied by F.
Proposition 3.4: For a view πY(R) and a set Σ of CFDs on R, (a) for each A ∈ (U−Y), Drop(Σ, A)+=Σ+[U−{A}]; (b) RBR(Σ, U−Y) is a propagation cover of Σ via πY(R), where U is the set of attributes in R.
A procedure is provided for computing a propagation cover of Σ via πY(R), also denoted by RBR. Generally, the idea is to repeatedly “drop” attributes in U−Y, shortcutting all CFDs that involve attributes in U−Y. The procedure takes as input Σ and πY(R), and returns RBR(Σ,U−Y) as the output.
Lemma 3.5: If for any source instance D where D|=Σ, V(D) is empty, then RV(A→A,(_∥a)) and RV(A→A,(_∥b)) are in CFDp(Σ,V), for any attribute A in RV and any distinct values a, b ∈ dom(A).
Generally, this ensures that the view is always empty (based on the emptiness problem): no tuple t in the view can possibly satisfy the CFDs, which require t[A] to take distinct a and b as its value. As a result, any CFD on the view can be derived from these “inconsistent” CFDs.
Algorithm for Computing Minimal Covers
Consider sources R1(B1′,B2), R2(A1,A2,A), R3(A′,A2′,B1,B), and view V=πY(σF(R1×R2×R3)), where Y={B1,B2,B1′,A1,A2,B}, and F is (B1=B1′and A=A′ and A2=A2′). Consider Σ consisting of ψ1=R2([A1,A2]→A,t1) and ψ2=R3([A′,A2,B1]→B,t2), for t1,t2 given in Example 3.2.
Applying algorithm PropCFD_SPC 300 to Σ and V, after step 10, EQ consists of {{B1,B1′},{B2},{A1},{A2},{B}}, and ΣV consists of φ1,φ2 of Example 3.2. As also given there, procedure RBR returns φ of Example 3.2. The EQ2CFD procedure 500 returns φ′=R(B1→B1′,(x∥x)), where R is the view schema with attributes in Y. Then, the cover returned by the algorithm consists of φ and φ′.
Analysis. It can be shown that for each φ in CFDp(Σ,V), Γ|=φ, and vice versa, where Γ is the output of the algorithm.
For the complexity, let V=πY(σF(Ec)). Then |Y|≦|Ec| and |F|≦(|Ec|2+|Ec|). (a) Procedure ComputeEQ 500 takes O(|Ec|4*|Σ|) time. (b) EQ2CFD 300 is in O(|Y|3) time. (c) Procedure RBR 400 has the same complexity as its counterpart in Gottlob 1987: O(|Ec|2*a3), where a is an upper bound for the cardinality of Γ during the execution of RBR 400. (d) The rest of the computation takes at most O(|Σ|3+a3+|Ec|2) time. Since a is no less than |Ec|*|Σ|, RBR 400 takes at least O(|Ec|5*|Σ|3) time. Putting these together, the cost of RBR 400 dominates. That is, the complexity of PropCFD13 SPC 300 is the same as the bound on the algorithm of Gottlob 1987. Note that both Σ and V are defined at the schema level (it has nothing to do with the instances of source databases), and are often small in practice.
In one exemplary embodiment, minimal cover is used as an optimization technique. First, Σ is “simplified” by invoking MinCover(Σ) (line 1 of
As another optimization technique, one may optionally simplify or minimize input SPC views. This works to an extent: the minimization problem for SPC queries is intractable.
System and Article of Manufacture Details
As is known in the art, the methods and apparatus discussed herein may be distributed as an article of manufacture that itself comprises a computer readable medium having computer readable code means embodied thereon. The computer readable program code means is operable, in conjunction with a computer system, to carry out all or some of the steps to perform the methods or create the apparatuses discussed herein. The computer readable medium may be a recordable medium (e.g., floppy disks, hard drives, compact disks, memory cards, semiconductor devices, chips, application specific integrated circuits (ASICs)) or may be a transmission medium (e.g., a network comprising fiber-optics, the world-wide web, cables, or a wireless channel using time-division multiple access, code-division multiple access, or other radio-frequency channel). Any medium known or developed that can store information suitable for use with a computer system may be used. The computer-readable code means is any mechanism for allowing a computer to read instructions and data, such as magnetic variations on a magnetic media or height variations on the surface of a compact disk.
The computer systems and servers described herein each contain a memory that will configure associated processors to implement the methods, steps, and functions disclosed herein. The memories could be distributed or local and the processors could be distributed or singular. The memories could be implemented as an electrical, magnetic or optical memory, or any combination of these or other types of storage devices. Moreover, the term “memory” should be construed broadly enough to encompass any information able to be read from or written to an address in the addressable space accessed by an associated processor. With this definition, information on a network is still within a memory because the associated processor can retrieve the information from the network.
It is to be understood that the embodiments and variations shown and described herein are merely illustrative of the principles of this invention and that various modifications may be implemented by those skilled in the art without departing from the scope and spirit of the invention.