Advertisement

Recursive Queries Using Object Relational Mapping

  • Marta Burzańska
  • Krzysztof Stencel
  • Patrycja Suchomska
  • Aneta Szumowska
  • Piotr Wiśniewski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6485)

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.

Keywords

Transport Change Python Language Union Select Object Relational Mapping Corporate Hierarchy 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    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]Google Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
    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)CrossRefGoogle Scholar
  8. 8.
    Ordonez, C.: Optimization of Linear Recursive Queries in SQL. IEEE Trans. Knowl. Data Eng., 264–277 (2010)Google Scholar
  9. 9.
    Melnik, S., Adya, A., Bernstein, P.A.: Compiling mappings to bridge applications and databases. In: ACM SIGMOD, pp. 461–472 (2007)Google Scholar
  10. 10.
    Keller, W.: Mapping objects to tables: A pattern language. In: EuroPLoP (2007)Google Scholar
  11. 11.
    Codd, E.F.: A relational model of data for large shared data banks. Communications of the ACM (1970)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Marta Burzańska
    • 1
  • Krzysztof Stencel
    • 1
    • 2
  • Patrycja Suchomska
    • 1
  • Aneta Szumowska
    • 1
  • Piotr Wiśniewski
    • 1
  1. 1.Faculty of Mathematics and Computer ScienceNicolaus Copernicus UniversityToruńPoland
  2. 2.Institute of InformaticsUniversity of WarsawWarsawPoland

Personalised recommendations