Queries with External Predicates

Paolo Guagliardo, Leonid Libkin, Victor Marsault, Wim Martens, Filip Murlak, Liat Peterfreund, Cristina Sirangelo

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Real-life query languages feature external predicates such as user-defined functions or built-in arithmetic and string operations. These predicates are often infinite, potentially leading to unsafe or non-computable queries. To overcome this, traditional languages such as SQL, put significant syntactic restrictions on the use of external predicates. These restrictions have been relaxed in a number of modern query languages, each doing it in their own way. Our goal therefore is to provide a theoretical basis for querying with external predicates. To this end, we formalize queries with external predicates based on the notion of access patterns. We develop a suitable evaluation model, based on Turing machines with oracles, and tailor the classical notion of query safety to it. Since query safety is undecidable in general, we can only produce sufficient conditions for guaranteeing safety. We do so by developing an inference system to derive safety and computability for relational algebra, first-order logic, as well as for a language that combines them both.

Original languageEnglish
Title of host publication28th International Conference on Database Theory, ICDT 2025
EditorsSudeepa Roy, Ahmet Kara
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959773645
DOIs
StatePublished - 21 Mar 2025
Event28th International Conference on Database Theory, ICDT 2025 - Barcelona, Spain
Duration: 25 Mar 202528 Mar 2025

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume328

Conference

Conference28th International Conference on Database Theory, ICDT 2025
Country/TerritorySpain
CityBarcelona
Period25/03/2528/03/25

Keywords

  • Access patterns
  • Computational model
  • External predicates
  • First-order logic
  • Infinite predicates
  • Oracles
  • Query safety
  • Relational algebra

All Science Journal Classification (ASJC) codes

  • Software

Fingerprint

Dive into the research topics of 'Queries with External Predicates'. Together they form a unique fingerprint.

Cite this