## Local Properties of Query Languages

### Cached

### Download Links

Citations: | 33 - 21 self |

### BibTeX

@MISC{Dong_localproperties,

author = {Guozhu Dong and Leonid Libkin and Limsoon Wong},

title = { Local Properties of Query Languages},

year = {}

}

### OpenURL

### Abstract

predeterminedportionoftheinput.Examplesincludeallrelationalcalculusqueries. everyrelationalcalculus(rst-order)queryislocal,thegeneralresultsprovedforlocalqueriescan manyeasyinexpressibilityproofsforlocalqueries.Wethenconsideracloselyrelatedproperty, namely,theboundeddegreeproperty.Itdescribestheoutputsoflocalqueriesonstructuresthat locallylook\simple."Everyquerythatislocalisshowntohavetheboundeddegreeproperty.Since Westartbyprovingageneralresultdescribingoutputsoflocalqueries.Thisresultleadsto toapplythanEhrenfeucht-Frassegames.Wealsoshowthatsomegeneralizationsofthebounded degreepropertythatwereconjecturedtohold,failforrelationalcalculus. beviewedas\o-the-shelf"strategiesforprovinginexpressibilityresults,whichareofteneasier maintenanceofviews,andshowthatSQLandrelationalcalculusareincapableofmaintainingthe gregates,whichisessentiallyplainSQL,hastheboundeddegreeproperty,thusansweringaques tionthathasbeenopenforseveralyears.Consequently,rst-orderquerieswithHartigorRescher quantiersalsohavetheboundeddegreeproperty.Finally,weapplyourresultstoincremental Wethenprovethatthelanguageobtainedfromrelationalcalculusbyaddinggroupingandag-

### Citations

510 |
Finite Model Theory
- Ebbinghaus, Flum
- 1995
(Show Context)
Citation Context ...ce, queries are denoted by lower case Greek letters; the associated mappings of structures are denoted by the corresponding upper case Greek letters. The following definitions are quite standard; see =-=[12, 18]-=-. Given a structure A, its graph G(A) is defined as hA; Ei where (a; b) is in E iff there is a tuple ~ t 2 R i for some i such that both a and b are in ~ t. It is also called the Gaifman graph of a st... |

273 |
Semantics of Programming Languages: Structures and Techniques
- Gunter
- 1992
(Show Context)
Citation Context ...r SQL-like language we add arithmetic and a summation operation to model aggregation. The syntax and typing rules of NRC(=) is given below, using the standard notations of programming language theory =-=[19]-=-. x s : s c : Q true : B false : B e 1 : B e 2 : s e 3 : s if e 1 then e 2 else e 3 : s e 1 : s e 2 : s e 1 = e 2 : B e : s 1 \Theta \Delta \Delta \Delta \Theta s nsi e : s i e 1 : s 1 \Delta \Delta \... |

231 | Languages that capture complexity classes
- Immerman
- 1987
(Show Context)
Citation Context ...grees as there are links in the chain. It is thus not definable by a local query even when auxiliary data of moderate degree are available. We thus have an example of a problem complete for DLOGSPACE =-=[28]-=- that cannot be definable by a local query even in the presence of relations of moderate degree. More applications of the BDP in the presence of auxiliary relations are given in Section 7. For now, le... |

215 |
The Situation in Logic
- Barwise
- 1989
(Show Context)
Citation Context ...involves a rather intricate argument. Furthermore, most current tools are applicable only to first-order logic and some of its extensions (like fragments of second-order logic [16], infinitary logics =-=[4]-=-, logics with counting [23], etc.); but they do not apply to languages that resemble real query languages, like SQL. The goal of this paper is to give a thorough study of local properties of queries i... |

170 | Incremental Maintenance of Views with Duplicates
- Griffin, Libkin
- 1995
(Show Context)
Citation Context ...There was a flurry of activity in studying such languages, resulting in the thorough study of interdefinability of their primitives [3, 32, 21], complexity [21], optimization [6], equational theories =-=[20]-=- and, finally, the limitations of their expressive power [36, 35]. In particular, it was shown in [36] that the transitive closure of a graph remains inexpressible even when grouping and aggregation a... |

165 |
An application of games to the completeness problem for formalized theories
- Ehrenfeucht
(Show Context)
Citation Context ...ransitive closure of a graph or the parity test. A large number of tools have been developed for first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games =-=[13, 17]-=-, locality [18], 0-1 laws [15], Hanf's technique [16, 24], the bounded degree property [36], etc. We are especially interested in local properties of queries, first introduced by Gaifman [18]. These s... |

145 |
Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions
- Klug
- 1982
(Show Context)
Citation Context ...alculus in that they have grouping constructs (modeled by the SQL GROUPBY) and aggregate functions such as COUNT and AVG. After some initial investigation of extended relational languages was done in =-=[29, 40]-=-, first results on expressive power appeared in [7]. However, the results of [7] were based on the assumption that the deterministic and nondeterministic logspace are different, and thus questions on ... |

132 | Principles of programming with complex objects and collection types. Theor
- Buneman, Naqvi, et al.
- 1995
(Show Context)
Citation Context ...lly, elements of the set type fsg are finite sets whose elements are of type s. We present the language incrementally. We start from NRC(=), which is equivalent to the usual nested relational algebra =-=[2, 5]-=-. To obtain our SQL-like language we add arithmetic and a summation operation to model aggregation. The syntax and typing rules of NRC(=) is given below, using the standard notations of programming la... |

132 |
On local and nonlocal properties
- Gaifman
- 1982
(Show Context)
Citation Context ...f a graph or the parity test. A large number of tools have been developed for first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games [13, 17], locality =-=[18]-=-, 0-1 laws [15], Hanf's technique [16, 24], the bounded degree property [36], etc. We are especially interested in local properties of queries, first introduced by Gaifman [18]. These state that the r... |

126 |
Probabilities on finite models
- Fagin
- 1976
(Show Context)
Citation Context ...e parity test. A large number of tools have been developed for first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games [13, 17], locality [18], 0-1 laws =-=[15]-=-, Hanf's technique [16, 24], the bounded degree property [36], etc. We are especially interested in local properties of queries, first introduced by Gaifman [18]. These state that the result of a quer... |

89 |
On monadic NP vs. monadic co-NP
- Fagin, Stockmeyer, et al.
- 1995
(Show Context)
Citation Context ...number of tools have been developed for first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games [13, 17], locality [18], 0-1 laws [15], Hanf's technique =-=[16, 24]-=-, the bounded degree property [36], etc. We are especially interested in local properties of queries, first introduced by Gaifman [18]. These state that the result of a query can be determined by look... |

74 | Reachability is harder for directed than for undirected finite graphs
- Ajtai, Fagin
- 1990
(Show Context)
Citation Context ...fragment of second-order logic, monadic \Sigma 1 1 , is not local. It is not hard to construct a nonlocal query using connectivity test for undirected graphs, which is definable in monadic \Sigma 1 1 =-=[3]-=-. We shall see later that there are other interesting examples of local queries, though restricted to some classes of structures. We define these restricted classes of structures below. They play a ce... |

73 |
Extending relational algebra and relational calculus with set-valued attributes and aggregate functions
- Ozsoyoglu, Ozsoyoglu, et al.
- 1987
(Show Context)
Citation Context ...alculus in that they have grouping constructs (modeled by the SQL GROUPBY) and aggregate functions such as COUNT and AVG. After some initial investigation of extended relational languages was done in =-=[29, 40]-=-, first results on expressive power appeared in [7]. However, the results of [7] were based on the assumption that the deterministic and nondeterministic logspace are different, and thus questions on ... |

69 | Optimization of real conjunctive queries
- Chaudhuri, Vardi
- 1993
(Show Context)
Citation Context ...e bags rather than sets. There was a flurry of activity in studying such languages, resulting in the thorough study of interdefinability of their primitives [3, 32, 21], complexity [21], optimization =-=[6]-=-, equational theories [20] and, finally, the limitations of their expressive power [36, 35]. In particular, it was shown in [36] that the transitive closure of a graph remains inexpressible even when ... |

69 |
Model-theoretic methods in the study of elementary logic
- Hanf
- 1965
(Show Context)
Citation Context ...number of tools have been developed for first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games [13, 17], locality [18], 0-1 laws [15], Hanf's technique =-=[16, 24]-=-, the bounded degree property [36], etc. We are especially interested in local properties of queries, first introduced by Gaifman [18]. These state that the result of a query can be determined by look... |

60 | Query languages for bags and aggregate functions
- Libkin, Wong
- 1997
(Show Context)
Citation Context ...r first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraiss'e games [13, 17], locality [18], 0-1 laws [15], Hanf's technique [16, 24], the bounded degree property =-=[36], etc. We -=-are especially interested in local properties of queries, first introduced by Gaifman [18]. These state that the result of a query can be determined by looking at "small neighborhoods" of it... |

58 | Towards tractable algebras for bags
- Grumbach, Milo
(Show Context)
Citation Context ...and languages whose main data structures are bags rather than sets. There was a flurry of activity in studying such languages, resulting in the thorough study of interdefinability of their primitives =-=[3, 32, 21]-=-, complexity [21], optimization [6], equational theories [20] and, finally, the limitations of their expressive power [36, 35]. In particular, it was shown in [36] that the transitive closure of a gra... |

57 | Normal forms and conservative properties for query languages over collection types
- Wong
- 1993
(Show Context)
Citation Context ... the maximal height of all types that appear in the typing derivation of e. For example, S f S ff(x; y)g j x 2 Rg j y 2 Sg is an expression of height 1 if both R and S are flat relations. It is known =-=[41, 44]-=- that when restricted to expressions of height 1, NRC(=) is equivalent to the usual relational algebra. We also write NRC(= b ) when the equality test is restricted to base types b, B , and Q. We some... |

54 | Counting quantifiers, successor relations, and logarithmic space - Etessami - 1997 |

50 |
Logical hierarchies in PTIME
- Hella
- 1996
(Show Context)
Citation Context ...ng languages local. One such technique was proposed in [30] which showed that queries in any reasonable logic that satisfies an analog of Hanf's theorem [24, 16] are local. Using this, and results of =-=[25, 38]-=-, the paper [30] showed that first-order logic extended with unary generalized quantifiers is local. In [31], a technique was presented that allows one to prove locality without a recourse to Hanf's t... |

49 | Dyn-FO: A parallel, dynamic complexity class
- Patnaik, Immerman
- 1997
(Show Context)
Citation Context ...is defined in relational calculus, or at least in the same language in which update propagations are specified, the problem of incremental maintenance has been studied thoroughly. However, few papers =-=[10, 8, 11, 42]-=- addressed the issue of maintaining queries such as the transitive closure in first-order or NRC aggr . It was shown [8] that, in the absence of auxiliary data, recursive queries such as transitive cl... |

44 |
Algebraic properties of bag data types
- Albert
(Show Context)
Citation Context ...and languages whose main data structures are bags rather than sets. There was a flurry of activity in studying such languages, resulting in the thorough study of interdefinability of their primitives =-=[3, 32, 21]-=-, complexity [21], optimization [6], equational theories [20] and, finally, the limitations of their expressive power [36, 35]. In particular, it was shown in [36] that the transitive closure of a gra... |

41 | New techniques for studying set languages, bag languages, and aggregate functions
- Libkin, Wong
- 1994
(Show Context)
Citation Context ... first-order logic (or equivalently, the relational calculus); these include Ehrenfeucht-Fraisse games [1, 12], locality [12, 15], 0-1 laws [1, 12], Hanf's technique [14], the bounded degree property =-=[24], etc. We -=-are especially interested in local properties of queries, first introduced by Gaifman [15]. These state that the result of a query can be determined by looking at "small neighborhoods" of it... |

40 | Incremental and decremental evaluation of transitive closure by first-order queries - Dong, Su - 1995 |

39 | Some properties of query languages for bags
- Libkin, Wong
- 1994
(Show Context)
Citation Context ...and languages whose main data structures are bags rather than sets. There was a flurry of activity in studying such languages, resulting in the thorough study of interdefinability of their primitives =-=[3, 32, 21]-=-, complexity [21], optimization [6], equational theories [20] and, finally, the limitations of their expressive power [36, 35]. In particular, it was shown in [36] that the transitive closure of a gra... |

30 |
Converting nested relational algebra expressions into algebra expressions
- Paredaens, Gucht
- 1992
(Show Context)
Citation Context ... the maximal height of all types that appear in the typing derivation of e. For example, S f S ff(x; y)g j x 2 Rg j y 2 Sg is an expression of height 1 if both R and S are flat relations. It is known =-=[41, 44]-=- that when restricted to expressions of height 1, NRC(=) is equivalent to the usual relational algebra. We also write NRC(= b ) when the equality test is restricted to base types b, B , and Q. We some... |

29 | Aggregate functions, conservative extension, and linear orders. This volume
- Libkin, Wong
(Show Context)
Citation Context ...ting. It can be expressed in NRC aggr as S ff( dept x; P fj1 j y 2 S fifsdept z =sdept x then ifssex z = 0 male 0 then f salary zg else fg else fg j z 2 EMP gjg)g j x 2 EMPg. In fact, it was shown in =-=[33, 36]-=- that all (nested) applications of SQL aggregate functions mentioned above can be implemented in NRC aggr . It is also known [33, 36] that NRC aggr has the conservative extension property. A language ... |

26 | Notions of locality and their logical characterizations over finite models
- Hella, Libkin, et al.
- 1999
(Show Context)
Citation Context ...cture of [9] was that every relational query in NRC aggr ( b ) that is order-independent has the bounded degree property. This conjecture was recently disproved by L. Hella; the proof can be found in =-=[26]-=-. Acknowledgements. We are greteful to anonymous reviewers for numerous comments and improvements. We thank Moshe Vardi suggesting the extension from Theorem 3.1 to Theorem 3.5. Part of this work was ... |

25 | On winning strategies with unary quantifiers
- Nurmonen
- 1996
(Show Context)
Citation Context ...ng languages local. One such technique was proposed in [30] which showed that queries in any reasonable logic that satisfies an analog of Hanf's theorem [24, 16] are local. Using this, and results of =-=[25, 38]-=-, the paper [30] showed that first-order logic extended with unary generalized quantifiers is local. In [31], a technique was presented that allows one to prove locality without a recourse to Hanf's t... |

23 | Conservativity of nested relational calculi with internal generic functions - Libkin, Wong - 1994 |

22 | Describing graphs: a first order approach to graph canonization - Immerman, Lander - 1990 |

20 | On the forms of locality over finite models
- Libkin
- 1997
(Show Context)
Citation Context ...with d depending on both locality rank and the arity. For details, see [31]. Another problem mentioned in [9] was to develop techniques for proving languages local. One such technique was proposed in =-=[30]-=- which showed that queries in any reasonable logic that satisfies an analog of Hanf's theorem [24, 16] are local. Using this, and results of [25, 38], the paper [30] showed that first-order logic exte... |

17 |
Space-Bounded FOIES
- Dong, Su
- 1995
(Show Context)
Citation Context ...is defined in relational calculus, or at least in the same language in which update propagations are specified, the problem of incremental maintenance has been studied thoroughly. However, few papers =-=[10, 8, 11, 42]-=- addressed the issue of maintaining queries such as the transitive closure in first-order or NRC aggr . It was shown [8] that, in the absence of auxiliary data, recursive queries such as transitive cl... |

17 | On counting logics and local properties
- Libkin
- 2000
(Show Context)
Citation Context ...as for the Gaifman graph of the output. It turns out that an analog of Theorem 3.1 can be proved for queries of arbitrary arity, with d depending on both locality rank and the arity. For details, see =-=[31]-=-. Another problem mentioned in [9] was to develop techniques for proving languages local. One such technique was proposed in [30] which showed that queries in any reasonable logic that satisfies an an... |

13 | On impossibility of decremental recomputation of recursive queries in relational calculus and SQL
- Dong, Libkin, et al.
(Show Context)
Citation Context ...is defined in relational calculus, or at least in the same language in which update propagations are specified, the problem of incremental maintenance has been studied thoroughly. However, few papers =-=[10, 8, 11, 42]-=- addressed the issue of maintaining queries such as the transitive closure in first-order or NRC aggr . It was shown [8] that, in the absence of auxiliary data, recursive queries such as transitive cl... |

11 | On the power of aggregation in relational query languages
- Libkin, Wong
- 1997
(Show Context)
Citation Context ...ted to finite relational structures. Two problems related to aggregate query languages were posed by [9]. The first one was to prove that every relational query in NRC aggr is local. This was done in =-=[37]-=- by using the following technique. For every relational query Q in NRC aggr , [37] shows how to construct another query Q 0 with the following two properties: (1) Q is local iff Q 0 is local, and (2) ... |

9 |
Query languages for complex object databases
- Abiteboul, Kanellakis
- 1990
(Show Context)
Citation Context ...lly, elements of the set type fsg are finite sets whose elements are of type s. We present the language incrementally. We start from NRC(=), which is equivalent to the usual nested relational algebra =-=[2, 5]-=-. To obtain our SQL-like language we add arithmetic and a summation operation to model aggregation. The syntax and typing rules of NRC(=) is given below, using the standard notations of programming la... |

9 |
Low complexity aggregation
- Consens, Mendelzon
- 1993
(Show Context)
Citation Context ...y the SQL GROUPBY) and aggregate functions such as COUNT and AVG. After some initial investigation of extended relational languages was done in [29, 40], first results on expressive power appeared in =-=[7]-=-. However, the results of [7] were based on the assumption that the deterministic and nondeterministic logspace are different, and thus questions on the expressive power of SQL-like languages remained... |

9 | Query languages for bags: expressive power and complexity
- Grumbach, Libkin, et al.
- 1996
(Show Context)
Citation Context ...t was shown in [36] that the transitive closure of a graph remains inexpressible even when grouping and aggregation are added to the relational calculus. For a survey of the results in this area, see =-=[22]-=-. Since there was no tool available for studying languages with aggregate functions, the technique we tried to use in [36] was the following. We tried to find a property possessed by the queries in ou... |

6 | Unary quantifiers and finite structures - Nurmonen - 1996 |

3 |
On the expressive power of counting. Theoretical Computer Science 149(1): 67--99
- Grumbach, Tollu
- 1995
(Show Context)
Citation Context ...e argument. Furthermore, most current tools are applicable only to first-order logic and some of its extensions (like fragments of second-order logic [16], infinitary logics [4], logics with counting =-=[23]-=-, etc.); but they do not apply to languages that resemble real query languages, like SQL. The goal of this paper is to give a thorough study of local properties of queries in a context that goes beyon... |

2 |
On representation and querying incomplete information
- Libkin, Wong
- 1995
(Show Context)
Citation Context ...sulting in the thorough study of interdefinability of their primitives [3, 32, 21], complexity [21], optimization [6], equational theories [20] and, finally, the limitations of their expressive power =-=[36, 35]-=-. In particular, it was shown in [36] that the transitive closure of a graph remains inexpressible even when grouping and aggregation are added to the relational calculus. For a survey of the results ... |

2 | Generalized Quantifiers
- Vaananen
- 1997
(Show Context)
Citation Context ...t it cannot express the transitive closure, if there is no ordering on the domain elements. It also follows that first-order queries with Hartig and Rescher (equicardinality and majority) quantifiers =-=[43]-=- have the bounded degree property. Finally, in Section 7 we apply our results to incremental maintenance of views, and show that SQL and relational calculus are incapable of maintaining the transitive... |

1 | Fraiss'e . Sur quelques classifications des syst`emes de relations. Universit'e d'Alger - unknown authors - 1954 |

1 | et al eds., Model-Theoretic Logics - Barwise - 1985 |