Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Extracting queries by static analysis of transparent persistence

Published: 17 January 2007 Publication History

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.]]
[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.]]
[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.]]
[4]
M. P. Atkinson and R. Morrison. Orthogonally persistent object systems. VLDB Journal, 4(3):319--401, 1995.]]
[5]
C. Batini, S. Ceri, and S. B. Navathe. Conceptual Database Design - An Entity-Relationship Approach. Benjamin Cummings, 1992.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[15]
O. Deux. The O2 system. Commun. ACM, 34(10):34--48, 1991.]]
[16]
J.-A. Dub, R. Sapir, and P. Purich. Oracle Application Server TopLink application developer guide, 10g (9.0.4). Oracle Corporation, 2003.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[22]
Hibernate reference documentation. http://www.hibernate.org/hib_docs/v3/reference/en/html, May 2005.]]
[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.]]
[24]
K. Kvilekval and A. Singh. SPREE: Object prefetching for mobile computers. In Distributed Objects and Applications (DOA), Oct 2004.]]
[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.]]
[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.]]
[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.]]
[28]
V. Matena and M. Hapner. Enterprise Java Beans Specification 1.0. Sun Microsystems, 1998.]]
[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.]]
[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.]]
[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.]]
[32]
B. C. Pierce. Types and Programming Languages. MIT Press, 2002.]]
[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.]]
[34]
C. Russell. Java Data Objects (JDO) Specification JSR-12. Sun Microsystems, 2003.]]
[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.]]
[36]
J. W. Schmidt and F. Matthes. The DBPL project: advances in modular database programming. Inf. Syst., 19(2):121--140, 1994.]]
[37]
R. Software. Whitepaper on the UML and Data Modeling, 2000.]]
[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.]]
[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.]]
[40]
R. Wilhelm, S. Sagiv, and T. W. Reps. Shape analysis. In Computational Complexity, pages 1--17, 2000.]]
[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.]]

Cited By

View all
  • (2024)WeBridge: Synthesizing Stored Procedures for Large-Scale Real-World Web ApplicationsProceedings of the ACM on Management of Data10.1145/36393192:1(1-29)Online publication date: 26-Mar-2024
  • (2015)Integrating query processing with parallel languages2015 31st IEEE International Conference on Data Engineering Workshops10.1109/ICDEW.2015.7129583(240-244)Online publication date: Apr-2015
  • (2010)Type-level access pattern viewInformation Sciences: an International Journal10.1016/j.ins.2010.07.006180:21(4118-4135)Online publication date: 1-Nov-2010
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

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
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 January 2007
Published in SIGPLAN Volume 42, Issue 1

Check for updates

Author Tags

  1. databases
  2. programming languages
  3. static analysis

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)17
  • Downloads (Last 6 weeks)1
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)WeBridge: Synthesizing Stored Procedures for Large-Scale Real-World Web ApplicationsProceedings of the ACM on Management of Data10.1145/36393192:1(1-29)Online publication date: 26-Mar-2024
  • (2015)Integrating query processing with parallel languages2015 31st IEEE International Conference on Data Engineering Workshops10.1109/ICDEW.2015.7129583(240-244)Online publication date: Apr-2015
  • (2010)Type-level access pattern viewInformation Sciences: an International Journal10.1016/j.ins.2010.07.006180:21(4118-4135)Online publication date: 1-Nov-2010
  • (2008)Self-configuring object-to-relational mapping queriesProceedings of the 6th international symposium on Principles and practice of programming in Java10.1145/1411732.1411740(53-59)Online publication date: 9-Sep-2008
  • (2008)Impact analysis of database schema changesProceedings of the 30th international conference on Software engineering10.1145/1368088.1368150(451-460)Online publication date: 15-May-2008
  • (2024)Orchard: Heterogeneous Parallelism and Fine-grained Fusion for Complex Tree TraversalsACM Transactions on Architecture and Code Optimization10.1145/365260521:2(1-25)Online publication date: 21-May-2024
  • (2021)UDF to SQL translation through compositional lazy inductive synthesisProceedings of the ACM on Programming Languages10.1145/34854895:OOPSLA(1-26)Online publication date: 15-Oct-2021
  • (2019)Sound, fine-grained traversal fusion for heterogeneous treesProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314626(830-844)Online publication date: 8-Jun-2019
  • (2018)Building Efficient Query Engines in a High-Level LanguageACM Transactions on Database Systems10.1145/318365343:1(1-45)Online publication date: 11-Apr-2018
  • (2017)TreeFuser: a framework for analyzing and fusing general recursive tree traversalsProceedings of the ACM on Programming Languages10.1145/31339001:OOPSLA(1-30)Online publication date: 12-Oct-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media