Publications

Stats

View publication

Title Incremental Mapping Compilation in an Object-to-Relational Mapping System
Authors Philip A. Bernstein, Marie Jacob, Jorge Pérez, Guillem Rull, James Terwilliger
Publication date 2013
Abstract In an object-to-relational mapping system (ORM), mapping
expressions explain how to expose relational data as objects and how to
store objects in tables. If mappings are sufficiently expressive, then it is
possible to define lossy mappings. If a user updates an object, stores it in
the database based on a lossy mapping, and then retrieves the object from
the database, the user might get a different result than the updated state
of the object; that is, the mapping might not "roundtrip." To avoid this,
the ORM should validate that user-defined mappings roundtrip the data.
However, this problem is NP-hard, so mapping validation can be very slow for
large or complex mappings.
\n\n
We circumvent this problem by developing an incremental compiler for OR
mappings. Given a validated mapping, a modification to the object schema is
compiled into incremental modifications of the mapping. We define the
problem formally, present algorithms to solve it for Microsoft's Entity
Framework, and report on an implementation. For some mappings, incremental
compilation is over 100 times faster than a full mapping compilation, in one
case dropping from 8 hours to 50 seconds.
Pages 1269-1280
Conference name SIGMOD International Conference on Management of Data
Publisher ACM Press (New York, NY, USA)
Reference URL View reference page