ComputingComputer ScienceComputer SystemsData ManagementDatabasesProgramming LanguagesDatabase ManagementObject-relational DatabasesQuery ProcessingRelational Data ModelRelational DatabasesType CheckingData AccessData-intensive ComputingDatabase Query InterfacesMetaprogrammingObject Relational MappingObject-relational Data ModelsPersistenceStatic Type Checking
Developers of data‑intensive applications increasingly use persistence frameworks such as EJB, Hibernate, and JDO, which support transparent persistence and explicit queries, but explicit queries lack static type and syntax checking because they are string‑based and interpreted at runtime. The paper introduces Safe Query Objects, a technique that represents queries as statically typed objects yet allows remote execution by a database server. Safe query objects translate query classes into database queries using object‑relational mapping and reflective metaprogramming, supporting complex joins, parameters, existentials, and dynamic criteria. A prototype JDO implementation demonstrates a type‑safe interface to the full query functionality of the JDO 1.0 standard.
Developers of data-intensive applications are increasingly using persistence frameworks such as EJB, Hibernate and JDO to access relational data. These frameworks support both transparent persistence for individual objects and explicit queries to efficiently search large collections of objects. While transparent persistence is statically typed, explicit queries do not support static checking of types or syntax because queries are manipulated as strings and interpreted at runtime. This paper presents Safe Query Objects, a technique for representing queries as statically typed objects while still supporting remote execution by a database server. Safe query objects use object-relational mapping and reflective metaprogramming to translate query classes into traditional database queries. The model supports complex queries with joins, parameters, existentials, and dynamic criteria. A prototype implementation for JDO provides a type-safe interface to the full query functionality in the JDO 1.0 standard.
16
Making the future safe for the past
Gilad Bracha, Martin Odersky, David Stoutamire et al. · 1998 · 503 citations · Full text
Extending query rewriting techniques for fine-grained access control
Shariq Rizvi, Alberto O. Mendelzon, S. Sudarshan et al. · 2004 · 314 citations
A modal analysis of staged computation
Rowan Davies, Frank Pfenning · Journal of the ACM · 2001 · 300 citations
Domain specific embedded compilers
Daan Leijen, Erik Meijer · 1999 · 250 citations · Full text
Orthogonally persistent object systems
Malcolm Atkinson, Ronald Morrison · The VLDB Journal · 1995 · 197 citations