GitHub

Object-relational mapping (with associations/keys)

A simplified version of the object-relational mapping in EMF along with models demonstrating a solver-based approach to bidirectional transformation.

Description

The uml2rdbms_keys.qvtr transformation is a simplified version of the classical object-relational mapping, between class diagrams and database schemes, used as a running example in the QVT standard.

Every persistent Class on the UML class diagram is matched to a Table in the relational database scheme, with a Column for every Attribute, including those inherited from super-classes. Associations between classes are mapped to foreign keys.

Meta-models and models are specified in the Eclipse Modelling Framework (EMF), enhanced with OCL constraints.

The provided Alloy models provide an encoding of the class diagram and database schemes and of the QVT-r transformation, demonstrating a solver-based approach to bidirectional transformations. In these models, model distance is calculated with graph-edit distance. An instantiation for a particular transformation example, described below, is also provided.

Meta-models

UML.ecore for UML class diagrams RDBMS.ecore for relational database schemes
UML metamodel RDBMS metamodel

Models

UML_Company.xmi RDB_Company.xmi
UML company RDB company

Development history


Read the original on github.com ↗