Solving ORM by MAGIC:MApping GeneratIon and Composition [chapter]

David Kensche, Christoph Quix, Xiang Li, Sandra Geisler
2010 Lecture Notes in Computer Science  
Object-relational mapping (ORM) technologies have been proposed as a solution for the impedance mismatch problem between object-oriented applications and relational databases. Existing approaches use special-purpose mapping languages or are tightly integrated with the programming language. In this paper, we present MAGIC, an approach using bidirectional query and update views, based on a generic metamodel and a generic mapping language. The mapping language is based on second-order
more » ... ing dependencies and allows arbitrary restructuring between the application model and the database schema. Due to the genericity of our approach, the core part including mapping generation and mapping composition is independent of the modeling languages being employed. We show the formal basis of MAGIC and how queries including aggregation can be defined using an easy to use query API. The scalability of our approach is shown in the evaluation using the TPC benchmark. schema and unmarshalling the objects, i.e., transforming the fetched records into instances of classes in the application model. Storing objects requires translation from the object-oriented model to the underlying relational schema. These tasks are tedious and error-prone; studies reported that 30-40% of the total project effort are spent on implementing object-relational data access [7] . Object-relational mapping (ORM) tools help solving these problems by mapping between the two paradigms and providing querying and updating capabilities. Existing ORM tools use special-purpose mapping languages (e.g., Hibernate) or are tightly integrated with the programming language (e.g., LINQ [13]), which avoids the general application of such technologies in other languages which are not based on the .NET framework. In this paper, we present our ORM framework MAGIC (MApping GeneratIon and Compilation), that we developed based on our generic metamodel GeRoMe [8] and its formal generic schema mappings [10].
doi:10.1007/978-3-642-16092-9_12 fatcat:6uoo3u5tvvg2haoecologr534u