← Back to Patent Explorer
US5897632A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and system for using materialized views to evaluate queries involving aggregation

Assignee: AT&T Properties LLC
•
Filing: 1997-07-16
•
Granted: 1999-04-27
•
Expires: 2017-07-16
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The present invention is a method and system for using materialized views to compute answers to SQL queries with grouping and aggregation. A query is evaluated a using a materialized view. The materialized view is semantically analyzed to determine whether the materialized view is usable in evaluating an input query. The semantic analysis includes determining that the materialized view does not project out any columns needed to evaluate the input query and determining that the view does not discard any tuple that satisfies a condition enforced in the input query. If the view is usable, the input query is rewritten to produce an output query that is multi-set equivalent to the input query and that specifies one or more occurrences of the materialized view as a source of information to be returned by the output query. The output query is then evaluated. The semantic analysis and rewriting may be iterated, with the output query of each iteration being the input query of the next iteration. The output query is evaluated after the last iteration.

Inventors

  • 👤 Shaul Dar
  • 👤 Hosagrahar Visvesvaraya Jagadish
  • 👤 Alon Yitzchak Levy
  • 👤 Divesh Srivastava

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-31 22:00
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/20; G06F16/24; G06F16/245; G06F16/2453; G06F16/24534; G06F16/24539; G06F16/2455; G06F16/24553; G06F16/24554; G06F16/24556; Y; Y10; Y10S; Y10S707/00; Y10S707/99931; Y10S707/99932; Y10S707/99933

Claims Analysis

Total Claims: 33
Claim 1
Independent Claim 101 words
A method of evaluating a query in a database system including a materialized view, the method comprising the steps of: receiving an input query; semantically analyzing the materialized view to determine whether the materialized view is usable in evaluating the input query; if the view is usable, rewriting the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query; and evaluating the output query.
Claim 2
Independent Claim 101 words
A method of evaluating a query in a database system including a materialized view, the method comprising the steps of: receiving an input query; semantically analyzing the materialized view to determine whether the materialized view is usable in evaluating the input query; if the view is usable, rewriting the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query; and evaluating the output query.
Claim 3
Dependent Claim 50 words
The method of claim 1, wherein the semantically analyzing step comprises the steps of: determining that the materialized view does not project out any columns needed to evaluate the input query; and determining that the view does not discard any tuple that satisfies a condition enforced in the input query.
Claim 4
Dependent Claim 40 words
The method of claim 2, wherein: the steps of semantically analyzing and rewriting are iterated, with the output query of each iteration being the input query of the next iteration; and the evaluating step is performed after the last iteration.
Claim 5
Dependent Claim 56 words
The method of claim 2, wherein: there are a plurality of materialized views; the steps of semantically analyzing and rewriting are iterated at least once for each of the materialized views, with the output query of each iteration being the input query of the next iteration; and the evaluating step is performed after the last iteration.
Claim 6
Dependent Claim 24 words
The method of claim 4, wherein: the steps of semantically analyzing and rewriting are further iterated for a given one of the materialized views.
Claim 7
Dependent Claim 16 words
The method of claim 4, wherein each one of the plurality of materialized views is similar.
Claim 8
Dependent Claim 17 words
The method of claim 4, wherein at least one of the plurality of materialized views is different.
Claim 9
Dependent Claim 16 words
The method of claim 4, wherein each one of the plurality of materialized views is different.
Claim 10
Dependent Claim 13 words
The method of claim 1, wherein the materialized view does not have aggregation.
Claim 11
Dependent Claim 11 words
The method of claim 1, wherein the materialized view has aggregation.
Claim 12
Independent Claim 114 words
A system for evaluating a query comprising: a storage device storing a materialized view; a receiver operable to receive an input query; a semantic analyzer operable to analyze the materialized view to determine whether the materialized view is usable in evaluating the input query; a query rewriting device operable to rewrite the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query, if the view is usable; and a query evaluator operable to evaluate the output query.
Claim 13
Independent Claim 114 words
A system for evaluating a query comprising: a storage device storing a materialized view; a receiver operable to receive an input query; a semantic analyzer operable to analyze the materialized view to determine whether the materialized view is usable in evaluating the input query; a query rewriting device operable to rewrite the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query, if the view is usable; and a query evaluator operable to evaluate the output query.
Claim 14
Dependent Claim 58 words
The system of claim 11, wherein the semantic analyzer comprises: a first analysis unit operable to determine that the materialized view does not project out any columns needed to evaluate the input query; and a second analysis unit operable to determine that the view does not discard any tuple that satisfies a condition enforced in the input query.
Claim 15
Dependent Claim 47 words
The system of claim 12, wherein: the semantic analyzer and query rewriting device are further iteratively operable, with the output query of each iteration coupled to the input query of the next iteration; and the query evaluator is coupled to the output query of the last iteration.
Claim 16
Dependent Claim 63 words
The system of claim 12, wherein: there are a plurality of materialized views; the semantic analyzer and query rewriting device are further iteratively operable at least once for each of the materialized views, with the output query of each iteration coupled to the input query of the next iteration; and the query evaluator is coupled to the output query of the last iteration.
Claim 17
Dependent Claim 25 words
The system of claim 14, wherein: the semantic analyzer and query rewriting device are further iteratively operable for a given one of the materialized views.
Claim 18
Dependent Claim 16 words
The system of claim 14, wherein each one of the plurality of materialized views is similar.
Claim 19
Dependent Claim 17 words
The system of claim 14, wherein at least one of the plurality of materialized views is different.
Claim 20
Dependent Claim 16 words
The system of claim 14, wherein each one of the plurality of materialized views is different.
Claim 21
Dependent Claim 13 words
The system of claim 11, wherein the materialized view does not have aggregation.
Claim 22
Dependent Claim 11 words
The system of claim 11, wherein the materialized view has aggregation.
Claim 23
Dependent Claim 120 words
A computer program storage device, comprising: a computer readable medium embodying computer program instructions for evaluating a query, including: computer program instruction means for receiving an input query; computer program instruction means for semantically analyzing a materialized view to determine whether the materialized view is usable in evaluating the input query; computer program instruction means for rewriting the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query, if the view is usable; and computer program instruction means for evaluating the output query.
Claim 24
Dependent Claim 120 words
A computer program storage device, comprising: a computer readable medium embodying computer program instructions for evaluating a query, including: computer program instruction means for receiving an input query; computer program instruction means for semantically analyzing a materialized view to determine whether the materialized view is usable in evaluating the input query; computer program instruction means for rewriting the input query to produce an output query that is multi-set equivalent to the input query, the output query including at least one reference to the materialized view as a source of information to be returned by the output query that was not included in the input query, if the view is usable; and computer program instruction means for evaluating the output query.
Claim 25
Dependent Claim 67 words
The computer program storage device of claim 21, wherein the computer program instruction means for semantically analyzing the materialized view comprises: computer program instruction means for determining that the materialized view does not project out any columns needed to evaluate the input query; and computer program instruction means for determining that the view does not discard any tuple that satisfies a condition enforced in the input query.
Claim 26
Dependent Claim 71 words
The computer program storage device of claim 22, further comprising: computer program instruction means for iteratively operating the computer program instruction means for semantically analyzing the materialized view and the computer program instruction means for rewriting the input query, with the output query of each iteration being the input query of the next iteration; and wherein the computer program instruction means for evaluating the output query operates after the last iteration.
Claim 27
Dependent Claim 94 words
The computer program storage device of claim 22, wherein there are a plurality of materialized views and the computer program storage device further comprises: computer program instruction means for iteratively operating the computer program instruction means for semantically analyzing the materialized view and the computer program instruction means for rewriting the input query at least once for each of the materialized views, with the output query of each iteration being the input query of the next iteration; and wherein the computer program instruction means for evaluating the output query operates after the last iteration.
Claim 28
Dependent Claim 51 words
The computer program storage device of claim 24, wherein: the computer program instruction means for iteratively operating the computer program instruction means for semantically analyzing the materialized view and the computer program instruction means for rewriting the input query are operable to iterate for a given one of the materialized views.
Claim 29
Dependent Claim 19 words
The computer program storage device of claim 24, wherein each one of the plurality of materialized views is similar.
Claim 30
Dependent Claim 20 words
The computer program storage device of claim 24, wherein at least one of the plurality of materialized views is different.
Claim 31
Dependent Claim 19 words
The computer program storage device of claim 24, wherein each one of the plurality of materialized views is different.
Claim 32
Dependent Claim 16 words
The computer program storage device of claim 21, wherein the materialized view does not have aggregation.
Claim 33
Dependent Claim 14 words
The computer program storage device of claim 21, wherein the materialized view has aggregation.

References Cited (Backward Citations)

US5276870A Cited
US5161225A Cited
US5600831A Cited
US5655116A Cited
US5768578A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2002-04-26 2002-10-26 2003-04-27 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2006-04-26 2006-10-26 2007-04-27 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2010-04-26 2010-10-26 2011-04-27 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag