Abstract
Recent years witnessed continuous development of database query languages and object relational mappers. One of the research fields of interest are recursive queries. The first implementations of such queries for SQL has been introduced by Oracle in 1985. However, it was the introduction of recursive Common Table Expressions into the SQL:99 standard that made the research on this topic more popular. Currently most of the popular DBMS implements recursive queries, but there are no object relational mappers that support such queries. In this paper we propose extending existing ORMs with recursive CTE’s support. A prototype of such an extension has been implemented in SQLObject mapper for the Python language. Tests have been conducted with PostgreSQL 8.4 database. Furthermore, recursive queries written using CTEs amount to be too complex and hard to comprehend. Our proposal overcomes this problem by pushing the formulation of recursive queries to a higher abstraction level, which makes them significantly simpler to write and to read.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Boniewicz, A., Burzanska, M., Przymus, P., Stencel, K.: Recursive query facilities in relational databases: a survey. manuscript sent for DTA (2010) [if both papers are accepted, the editor may change this reference]
Burzanska, M., Stencel, K., Wisniewski, P.: Pushing Predicates into Recursive SQL Common Table Expressions. In: Grundspenkis, J., Morzy, T., Vossen, G. (eds.) ADBIS 2009. LNCS, vol. 5739, pp. 194–205. Springer, Heidelberg (2009)
JDBC Driver class documentation, http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Driver.html
SQLObject, http://www.sqlobject.org/
Recursive queries in PostgreSQL, http://www.postgresql.org/docs/8.4/static/queries-with.html
Ghazal, A., Crolotte, A., Seid, D.Y.: Recursive SQL Query Optimization with k-Iteration Lookahead. In: Bressan, S., Küng, J., Wagner, R. (eds.) DEXA 2006. LNCS, vol. 4080, pp. 348–357. Springer, Heidelberg (2006)
Ordonez, C.: Optimization of Linear Recursive Queries in SQL. IEEE Trans. Knowl. Data Eng., 264–277 (2010)
Melnik, S., Adya, A., Bernstein, P.A.: Compiling mappings to bridge applications and databases. In: ACM SIGMOD, pp. 461–472 (2007)
Keller, W.: Mapping objects to tables: A pattern language. In: EuroPLoP (2007)
Codd, E.F.: A relational model of data for large shared data banks. Communications of the ACM (1970)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Burzańska, M., Stencel, K., Suchomska, P., Szumowska, A., Wiśniewski, P. (2010). Recursive Queries Using Object Relational Mapping. In: Kim, Th., Lee, Yh., Kang, BH., Ślęzak, D. (eds) Future Generation Information Technology. FGIT 2010. Lecture Notes in Computer Science, vol 6485. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17569-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-17569-5_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-17568-8
Online ISBN: 978-3-642-17569-5
eBook Packages: Computer ScienceComputer Science (R0)