On Materializing Paths for Faster Recursive Querying
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.
Unable to display preview. Download preview PDF.
- 1.Brandon, D.: Recursive database structures. J. Comp. Sci. Coll. 21, 295–304 (2005)Google Scholar
- 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
- 6.Melnik, S., Adya, A., Bernstein, P.A.: Compiling mappings to bridge applications and databases. ACM Trans. Database Syst. 33 (2008)Google Scholar
- 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.Bauer, C., King, G.: Java Persistence with Hibernate. Manning Publications Co., Greenwich (2006)Google Scholar
- 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