×

Practical relational calculus query evaluation. (English) Zbl 07838433

Aspnes, James (ed.) et al., 1st symposium on algorithmic foundations of dynamic networks, SAND 2022, virtual conference, March 28–30, 2022. Wadern: Schloss Dagstuhl – Leibniz-Zentrum für Informatik. LIPIcs – Leibniz Int. Proc. Inform. 221, Article 11, 21 p. (2022).
Summary: 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.
For the entire collection see [Zbl 1489.68005].

MSC:

68Mxx Computer system organization
68R10 Graph theory (including graph drawing) in computer science

Software:

rc2sql; DDDLIB; MONA
Full Text: DOI