skip to main content
article

Extracting queries by static analysis of transparent persistence

Published:17 January 2007Publication History
Skip Abstract Section

Abstract

Transparent persistence promises to integrate programming languages and databases by allowing procedural programs to access persistent data with the same ease as non-persistent data. When the data is stored in a relational database, however, transparent persistence does not naturally leverage the performance benefits of relational query optimization. We present a program analysis that combines the benefits of both approaches by extracting database queries from programs with transparent access to persistent data. The analysis uses a sound abstract interpretation of the original program to approximate the data traversal paths in the program and the conditions under which the paths are used. The resulting paths are then converted into a query, and the program is simplified by removing redundant tests. We study an imperative kernel language with read-only access to persistent data and identify the conditions under which the transformations can be applied. This analysis approach promises to combine the software engineering benefits of transparent data persistence with the performance benefits of database query optimization.

References

  1. J. R. Allen and K. Kennedy. Automatic loop interchange. In Proc. of the Symp. on Compiler Construction (CC), pages 233--246, 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. P. Atkinson. Programming languages and databases. In Proc. of the Intl. Conf. on Very Large Data Bases (VLDB), pages 408--419. IEEE Computer Society, 1978.]]Google ScholarGoogle Scholar
  3. M. P. Atkinson, L. Daynès, M. J. Jordan, T. Printezis, and S. Spence. An orthogonally persistent Java. SIGMOD Rec., 25(4):68--75, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. P. Atkinson and R. Morrison. Orthogonally persistent object systems. VLDB Journal, 4(3):319--401, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Batini, S. Ceri, and S. B. Navathe. Conceptual Database Design - An Entity-Relationship Approach. Benjamin Cummings, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. A. Bernstein, S. Pal, and D. Shutt. Context-based prefetch for implementing objects on relations. In The VLDB Journal, pages 327--338, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. M. Bierman, E. Meijer, and W. Schulte. The essence of data access in cω. In Proc. of the European Conference on Object-Oriented Programming (ECOOP), pages 287--311, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. G. G. Cattell, D. K. Barry, M. Berler, J. Eastman, D. Jordan, C. Russell, O. Schadow, T. Stanienda, and F. Velez, editors. The Object Data Standard ODMG 3.0. Morgan Kaufmann, January 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Chaudhuri. An overview of query optimization in relational systems. In Proc. of Symp. on Principles of Database System (PODS), pages 34--43, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. P. Chen. The entity-relationship model - toward a unified view of data. ACM Transactions on Database Systems (TODS), 1(1):9--36, 1976.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. W. R. Cook and S. Rai. Safe query objects: Statically typed objects as remotely executable queries. In Proc. of the Intl. Conf. on Software Engineering (ICSE), pages 97--106, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Copeland and D. Maier. Making smalltalk a database system. In Proceedings of the 1984 ACM SIGMOD international conference on Management of data, pages 316--325. ACM Press, 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. Cousot and R. Cousot. Systematic design of program transformation frameworks by abstract interpretation. In Proc. of the ACM Symp. on Principles of Programming Languages (POPL), pages 178--190, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Deutsch. A storeless model of aliasing and its abstractions using finiterepresentations of right-regular equivalence relations. Computer Languages, 1992., Proceedings of the 1992 International Conference on, pages 2--13, 1992.]]Google ScholarGoogle ScholarCross RefCross Ref
  15. O. Deux. The O2 system. Commun. ACM, 34(10):34--48, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J.-A. Dub, R. Sapir, and P. Purich. Oracle Application Server TopLink application developer guide, 10g (9.0.4). Oracle Corporation, 2003.]]Google ScholarGoogle Scholar
  17. M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In PLDI '94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, pages 242--256, New York, NY, USA, 1994. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Gawecki and F. Matthes. Integrating query and program optimization using persistent CPS representations. In M. P. Atkinson and R. Welland, editors, Fully Integrated Data Environments, ESPRIT Basic Research Series, pages 496--501. Springer Verlag, 2000.]]Google ScholarGoogle Scholar
  19. R. Ghiya and L. J. Hendren. Is it a tree, a DAG, or a cyclic graph? a shape analysis for heap-directed pointers in C. In Proc. of the ACM Symp. on Principles of Programming Languages (POPL), pages 1--15, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Gould, Z. Su, and P. Devanbu. Static checking of dynamically generated queries in database applications. In Proc. of the Intl. Conf. on Software Engineering (ICSE), pages 645--654, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. W.-S. Han, Y.-S. Moon, and K.-Y. Whang. PrefetchGuide: capturing navigational access patterns for prefetching in client/server object-oriented/object-relational dbmss. Information Sciences, 152(1):47--61, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hibernate reference documentation. http://www.hibernate.org/hib_docs/v3/reference/en/html, May 2005.]]Google ScholarGoogle Scholar
  23. A. Ibrahim and W. Cook. Automatic prefetching by traversal profiling in object persistence architectures. In Proc. of the European Conference on Object-Oriented Programming (ECOOP), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. Kvilekval and A. Singh. SPREE: Object prefetching for mobile computers. In Distributed Objects and Applications (DOA), Oct 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  25. B. Liskov, A. Adya, M. Castro, S. Ghemawat, R. Gruber, U. Maheshwari, A. C. Myers, M. Day, and L. Shrira. Safe and efficient sharing of persistent objects in Thor. In Proceedings of the Intl. Conf. on Management of Data (SIGMOD), pages 318--329, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Maier. Representing database programs as objects. In F. Bancilhon and P. Buneman, editors, Advances in Database Programming Languages, pages 377--386. New York, NY, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. Maier, J. Stein, A. Otis, and A. Purdy. Developments of an object-oriented DBMS. In Proc. of ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 472--482, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. V. Matena and M. Hapner. Enterprise Java Beans Specification 1.0. Sun Microsystems, 1998.]]Google ScholarGoogle Scholar
  29. F. Matthes, G. Schroder, and J. Schmidt. Tycoon: A scalable and interoperable persistent system environment. In M. Atkinson, editor, Fully Integrated Data Environments. Springer-Verlag, 1995.]]Google ScholarGoogle Scholar
  30. R. Morrison, R. C. H. Connor, G. N. C. Kirby, D. S. Munro, M. P. Atkinson, Q. I. Cutts, A. L. Brown, and A. Dearle. The Napier88 persistent programming language and environment. In M. P. Atkinson and R. Welland, editors, Fully Integrated Data Environments, pages 98--154. Springer, 1999.]]Google ScholarGoogle Scholar
  31. M. Neubauer and P. Thiemann. From sequential programs to multi-tier applications by program transformation. In Proc. of the ACM Symp. on Principles of Programming Languages (POPL), pages 221--232, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. C. Pierce. Types and Programming Languages. MIT Press, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. T. Rus and E. Van Wyk. A formal approach to parallelizing compilers. In Proc. of the SIAM Conf. on Parallel Processing for Scientific Computation, March 14, 1997.]]Google ScholarGoogle Scholar
  34. C. Russell. Java Data Objects (JDO) Specification JSR-12. Sun Microsystems, 2003.]]Google ScholarGoogle Scholar
  35. J. Schmidt, F. Matthes, and P. Valduriez. Building persistent application systems in fully integrated data environments: Modularization, abstraction and interoperability. In Proceedings of Euro-Arch'93 Congress. Springer Verlag, Oct. 1993.]]Google ScholarGoogle ScholarCross RefCross Ref
  36. J. W. Schmidt and F. Matthes. The DBPL project: advances in modular database programming. Inf. Syst., 19(2):121--140, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. R. Software. Whitepaper on the UML and Data Modeling, 2000.]]Google ScholarGoogle Scholar
  38. R. Vitenberg, K. Kvilekval, and A. K. Singh. Increasing concurrency in databases using program analysis. In Proc. of the European Conference on Object Oriented Programming (ECOOP), pages 341--363, 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  39. M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(2):181--210, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. R. Wilhelm, S. Sagiv, and T. W. Reps. Shape analysis. In Computational Complexity, pages 1--17, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. D. Willis, D. J. Pearce, and J. Noble. Efficient object querying in Java. In Proc. of the European Conference on Object-Oriented Programming (ECOOP), Nantes, France, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Extracting queries by static analysis of transparent persistence

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 42, Issue 1
          Proceedings of the 2007 POPL Conference
          January 2007
          379 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1190215
          Issue’s Table of Contents
          • cover image ACM Conferences
            POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
            January 2007
            400 pages
            ISBN:1595935754
            DOI:10.1145/1190216

          Copyright © 2007 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 17 January 2007

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!