Arrow Research search
Back to I&C

I&C 2020

HR-SQL: Extending SQL with hypothetical reasoning and improved recursion for current database systems

Journal Article journal-article Computer Science · Theoretical Computer Science

Abstract

In this work we present a formalization, backed with a contrasted implementation, of a relational database language (called HR-SQL) that extends SQL in two aspects. On the one hand, including non-linear and mutual recursion. On the other hand, including hypothetical relations and queries. Regarding expressiveness, HR-SQL allows a novel form of hypothetical reasoning, completely integrated with recursive definitions. In addition, aggregate functions are added. Regarding formalization, the extended language is founded on a stratified fixpoint semantics based on logic programming techniques. We include results of the existence of such fixpoints. An algorithm that transforms a database containing hypothetical definitions into an equivalent one without hypothesis and its correctness proof are presented. Regarding the implementation, we introduce here a system that incorporates the aforementioned benefits and enhances former implementations in several areas. The current HR-SQL system is targeted to several state-of-the-art relational database systems, and could be used with any SQL-based system with minor modifications in the implementation.

Authors

Keywords

  • Relational databases
  • SQL
  • Recursion
  • Hypothetical queries
  • Fixpoint semantics

Context

Venue
Information and Computation
Archive span
1987-2026
Indexed papers
3021
Paper id
601197414863720189
v2026.09.13