Efficient Evaluation of Arbitrary Relational Calculus Queries

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Raszyk, Martin, Basin, David, Krstić, Srđan, Traytel, Dmitriy
Natura: Preprint
Pubblicazione: 2022
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866929241340248064
author Raszyk, Martin
Basin, David
Krstić, Srđan
Traytel, Dmitriy
author_facet Raszyk, Martin
Basin, David
Krstić, Srđan
Traytel, Dmitriy
contents The relational calculus (RC) is a concise, declarative query language. However, existing RC query evaluation approaches are inefficient and often deviate from established algorithms based on finite tables used in database management systems. We devise a new translation of an arbitrary RC query into two safe-range queries, for which the finiteness of the query's evaluation result is guaranteed. Assuming an infinite domain, the two queries have the following meaning: The first is closed and characterizes the original query's relative safety, i.e., whether given a fixed database, the original query evaluates to a finite relation. The second safe-range query is equivalent to the original query, if the latter is relatively safe. We compose our translation with other, more standard ones to ultimately obtain two SQL queries. This allows us to use standard database management systems to evaluate arbitrary RC queries. We show that our translation improves the time complexity over existing approaches, which we also empirically confirm in both realistic and synthetic experiments.
format Preprint
id arxiv_https___arxiv_org_abs_2210_09964
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle Efficient Evaluation of Arbitrary Relational Calculus Queries
Raszyk, Martin
Basin, David
Krstić, Srđan
Traytel, Dmitriy
Databases
Logic in Computer Science
The relational calculus (RC) is a concise, declarative query language. However, existing RC query evaluation approaches are inefficient and often deviate from established algorithms based on finite tables used in database management systems. We devise a new translation of an arbitrary RC query into two safe-range queries, for which the finiteness of the query's evaluation result is guaranteed. Assuming an infinite domain, the two queries have the following meaning: The first is closed and characterizes the original query's relative safety, i.e., whether given a fixed database, the original query evaluates to a finite relation. The second safe-range query is equivalent to the original query, if the latter is relatively safe. We compose our translation with other, more standard ones to ultimately obtain two SQL queries. This allows us to use standard database management systems to evaluate arbitrary RC queries. We show that our translation improves the time complexity over existing approaches, which we also empirically confirm in both realistic and synthetic experiments.
title Efficient Evaluation of Arbitrary Relational Calculus Queries
topic Databases
Logic in Computer Science
url https://arxiv.org/abs/2210.09964