Reasoning about strings in databases

  • Authors:
  • Gösta Grahne;Matti Nykänen;Esko Ukkonen

  • Affiliations:
  • Department of Computer Science, P.O. Box 26, FIN-00014, University of Helsinki, FINLAND;Department of Computer Science, P.O. Box 26, FIN-00014, University of Helsinki, FINLAND;Department of Computer Science, P.O. Box 26, FIN-00014, University of Helsinki, FINLAND

  • Venue:
  • PODS '94 Proceedings of the thirteenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

In order to enable the database programmer to reason about relations over strings of arbitrary length we introduce alignment logic, a modal extension of relational calculus. In addition to relations, a state in the model consists of a two-dimensional array where the strings are aligned on top of each other. The basic modality in the language (a transpose, or “slide”) allows for a rearrangement of the alignment, and more complex formulas can be formed using a syntax reminiscent of regular expressions, in addition to the usual connectives and quantifiers. It turns out that the computational counterpart of the string-based portion of the logic is the class of multitape two-way finite state automata, which are devices particularly well suited for the implementation of string matching. A computational counterpart of the full logic is obtained from relational algebra by extending the selection operator into filters based on these multitape machines. Safety of formulas in alignment logic implies that new strings generated from old ones have to be of bounded length. While an undecidable property in general, this boundedness is decidable for an important subclass of formulas. As far as expressive power is concerned, alignment logic includes previous proposals for querying string databases, and gives full Turing computability. The language can be restricted to define exactly regular sets and sets in the polynomial hierarchy.