MINIMAL DIFFERENCE QUERY AND VIEW MATCHING

Information

  • Patent Application
  • 20070198469
  • Publication Number
    20070198469
  • Date Filed
    November 30, 2006
    17 years ago
  • Date Published
    August 23, 2007
    17 years ago
Abstract
The subject disclosure pertains to efficient computation of the difference between queries by exploiting commonality between them. A minimal difference query (MDQ) is generated that roughly corresponds to removal of as many joins as possible while still accurately representing the query difference. The minimal difference can be employed to further substantially the scope of view matching where a query is not wholly subsumed by a view. Additionally, the minimal difference query can be employed as an analytical tool in various contexts.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram of a query difference system.



FIG. 2 is a block diagram of a difference component.



FIG. 3 is a block diagram of a query difference system.



FIG. 4 is a block diagram of a constraint difference component.



FIG. 5 is a block diagram of a query difference system.



FIG. 6 is a diagram of query and view portions with respect to view matching.



FIG. 7 is a block diagram of a view matching system.



FIG. 8 is a flow chart diagram of a method of generating a minimal set difference query.



FIG. 9 is a flow chart diagram of a method of generating a minimal set difference query exploiting constraints.



FIG. 10 is a flow chart diagram of a method of generating a bag difference.



FIG. 11 is a flow chart diagram of a view matching methodology.



FIG. 12 is a flow chart diagram of an extended view matching methodology.



FIGS. 13-16 are charts illustrating experimental results.



FIG. 17 is a schematic block diagram illustrating a suitable operating environment for aspects of the subject innovation.



FIG. 18 is a schematic block diagram of a sample-computing environment.


Claims
  • 1. A view matching system comprising the following computer implemented components: an input component that receives a query and a materialized view, wherein the materialized view only partially intersects with the query;an intersection component that determines the intersection between the query and materialized view; anda view map component that generates an intersection query by rewriting the intersection between the query and materialized view in terms of the materialized view.
  • 2. The view matching system of claim 1, further comprising a constraint difference component that determines the difference between the query and materialized view to generate a difference query.
  • 3. The view matching system of claim 2, further comprising a query writing component that generates a new query that is the union of the intersection query and difference query
  • 4. The view matching system of claim 2, wherein the constraint difference component generates a minimal difference query representing the difference between the query and materialized view.
  • 5. The view matching system of claim 4, the constraint difference component includes a naïve difference component that generates a naïve representation of the difference between the query and materialized view.
  • 6. The view matching system of claim 5, the constraint difference component includes a partition component that partitions the naïve representation into a plurality of queries the union of which is equivalent to the naïve representation.
  • 7. The view matching system of claim 6, the constraint difference component includes an analysis component that analyzes the plurality of queries to identity redundant or contradictory queries that can be removed.
  • 8. The view matching system of claim 7, the constraint difference component generates the minimal difference query from the naïve representation and eliminates identified redundant or contradictory queries.
  • 9. The view matching system of claim 8, further comprising a functional dependency component that modifies the query and materialized view to enable the constraint difference component to eliminate more queries based on functional dependencies.
  • 10. The view matching system of claim 9, further comprising an inclusion dependency component that eliminates one or more queries from the minimal difference query based on inclusion dependencies.
  • 11. The view matching system of claim 4, wherein the constraint difference component employs a bag difference algorithm to generate the minimal difference query.
  • 12. A view matching method comprising the following computer implemented acts: receiving a query and a materialized view, wherein the materialized view only partially intersects with the query;generating an intersection query by rewriting an intersection between the query and materialized view in terms of the materialized view.
  • 13. The method of claim 12, further comprising generating a difference query representing the difference between the query and materialized view.
  • 14. The view matching system of claim 13, further comprising generating a new query that is the union of the intersection query and difference query
  • 15. The method of claim 13, further comprising: partitioning conjuncts in a naïve rewritten query representing the difference query;analyzing the conjuncts for redundancy by identifying redundant constructs in one or more partitions; andgenerating a minimal difference query from the naïve rewritten query with redundancies removed.
  • 16. The method of claim 15, partitioning comprising: dividing each conjuncts into individual partition; andmerging partitions that share common free variables.
  • 17. The method of claim 16, simplifying the query difference based on functional dependencies, comprising: renaming variables in queries in accordance with functional dependencies such that if Vk functionally determines v, then all occurrences of v are renamed using the same variable; andgenerating new bound variables VQd⊂VQf, where for each vεVQd, there exists a set of variables VK⊂V that functionally determines v.
  • 18. A view matching system, comprising: means for receiving a query and a materialized view, wherein the materialized view only partially intersects with the query;means for generating an intersection query by rewriting an intersection between the query and materialized view in terms of the materialized view.
  • 19. The system of claim 18, further comprising means for generating a minimal difference query representing the difference between the query and materialized view.
  • 20. The system of claim 19, further comprising means for generating a new query that is the union of the intersection query and difference query.
Divisions (1)
Number Date Country
Parent 11352628 Feb 2006 US
Child 11564981 US