research

R-SQL: An SQL Database System with Extended Recursion

Abstract

The relational database language SQL:1999 standard supports recursion, but thisapproach is limited to the linear case. Moreover, mutual recursion is not supported,and negation cannot be combined with recursion. We designed the language R-SQLto overcome these limitations in [ANSS13], improving termination properties in re-cursive definitions. In addition we developed a proof of concept implementation ofan R-SQL system. In this paper we describe in detail an improved system enhanc-ing performance. It can be integrated into existing RDBMS’s, extending them withthe aforementioned benefits of R-SQL. The system processes an R-SQL databasedefinition obtaining its extension in tables of an RDBMS (such as PostgreSQL andDB2). It is implemented in SWI-Prolog and it produces a Python script that, uponexecution, computes the result of the R-SQL relations. We provide some perfor-mance results showing the efficiency gains w.r.t. the previous version. We alsoinclude a comparative analysis including some representative relational a deductive systems

    Similar works