Unrolling SQL: 1999 Recursive Queries
2012; Springer Science+Business Media; Linguagem: Inglês
10.1007/978-3-642-35603-2_50
ISSN1865-0937
AutoresAleksandra Boniewicz, Krzystof Stencel, Piotr Wiśniewski,
Tópico(s)Semantic Web and Ontologies
ResumoHierarchical and graph data structures are common in practical application development. In order to query such data, one can use SQL:1999 recursive queries based on Common Table Expressions. Nowadays, numerous relational database management systems implement them. However, some popular systems, e.g. MySQL, still lack this useful feature. In this paper we show three methods to circumvent this situation: (1) the direct loop, (2) horizontal unrolling and (3) vertical unrolling. We analyze them and present a report on tests of their efficiency. We also describe our implementation of these methods as a prototype extension to Hibernate, a major object-relational mapping system. This extension allows running SQL:1999 recursive queries directly from an application code, even when the underlying DBMS does not support them.
Referência(s)