On Materializing Paths for Faster Recursive Querying

  • Aleksandra Boniewicz
  • Piotr Wiśniewski
  • Krzysztof Stencel
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 241)

Abstract

Recursive data structures are often used in business applications. They store data on e.g. corporate hierarchies, product categories and bill-of-material. Therefore, recursive queries as introduced by SQL:1999 or formerly implemented by Oracle constitute a useful facility for application programmers. Unfortunately, recursive queries are not implemented by a number of database systems with MySQL as the most profound example. If an application has such a database as the backend storage, recursive queries will be usually hard-coded at the client side. This is not efficient. In this paper we propose using redundant data structures to answer recursive queries quicker. Such structures must be synchronized in response to updates of data. This means a significant processing overhead for updates. We present experimental evaluation to show loses and gains caused by our solution for various usage scenarios. They prove the feasibility of our proposal. We show our proof-of-concept implementation as a part of the Hibernate framework. Thus, application programmers are separated from all internals of necessary database objects and triggers. These are created automatically by Hibernate generators.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Brandon, D.: Recursive database structures. J. Comp. Sci. Coll. 21, 295–304 (2005)Google Scholar
  2. 2.
    Przymus, P., Boniewicz, A., Burzańska, M., Stencel, K.: Recursive query facilities in relational databases: A survey. In: FGIT-DTA/BSBT, pp. 89–99 (2010)Google Scholar
  3. 3.
    Ordonez, C.: Optimization of linear recursive queries in SQL. IEEE Trans. Knowl. Data Eng. 22, 264–277 (2010)CrossRefGoogle Scholar
  4. 4.
    Burzańska, M., Stencel, K., Wiśniewski, 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
  5. 5.
    Cortesi, A., Halder, R.: Abstract interpretation of recursive queries. In: Hota, C., Srimani, P.K. (eds.) ICDCIT 2013. LNCS, vol. 7753, pp. 157–170. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  6. 6.
    Melnik, S., Adya, A., Bernstein, P.A.: Compiling mappings to bridge applications and databases. ACM Trans. Database Syst. 33 (2008)Google Scholar
  7. 7.
    O’Neil, E.J.: Object/relational mapping 2008: Hibernate and the Entity Data Model (EDM). In: Wang, J.T.L. (ed.) SIGMOD Conference, pp. 1351–1356. ACM (2008)Google Scholar
  8. 8.
    Bauer, C., King, G.: Java Persistence with Hibernate. Manning Publications Co., Greenwich (2006)Google Scholar
  9. 9.
    Wiśniewski, P., Szumowska, A., Burzańska, M., Boniewicz, A.: Hibernate the recursive queries - defining the recursive queries using Hibernate ORM. In: ADBIS (2), pp. 190–199 (2011)Google Scholar
  10. 10.
    Gawarkiewicz, M., Wiśniewski, P.: Partial aggregation using hibernate. In: Kim, T.-H., Adeli, H., Slezak, D., Sandnes, F.E., Song, X., Chung, K.-I., Arnett, K.P. (eds.) FGIT 2011. LNCS, vol. 7105, pp. 90–99. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  11. 11.
    Boniewicz, A., Stencel, K., Wiśniewski, P.: Unrolling SQL: 1999 recursive queries. In: Kim, T.-H., Ma, J., Fang, W.-C., Zhang, Y., Cuzzocrea, A. (eds.) EL/DTA/ UNESST 2012. CCIS, vol. 352, pp. 345–354. Springer, Heidelberg (2012)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Aleksandra Boniewicz
    • 1
  • Piotr Wiśniewski
    • 1
  • Krzysztof Stencel
    • 1
  1. 1.Faculty of Mathematics and Computer ScienceNicolaus Copernicus UniversityToruńPoland

Personalised recommendations