The growing need to store and manipulate large volumes of data has led to the blossoming of various families of data storage solutions. Software modelers can benefit from this growing diversity to improve critical parts of their applications, using a combination of different databases to store the data based on access, availability, and performance requirements. Indeed, more and more applications rely on a combination of different data sources on a variety of database platforms, mixing SQL and NoSQL ones. Model-driven engineering methods need to adapt to this new reality.

Code-generators and low-code tools need to be able to target a combination of SQL and NoSQL databases as storage mechanisms for the apps they generate. Our UMLtoNoSQL solution enables this. Click To Tweet

However, while the mapping of conceptual schemas to relational databases is a well-studied field of research, there are few works that target the role of domain modeling in a multiple and diverse data storage scenario. This is particularly true when dealing with the mapping of constraints in the input schema.

Our solution is the UmlToNoSQL approach that maps models expressed in UML/OCL into a set of logical schemas (either relational or NoSQL ones) to be used to store the application data according to the data partition envisaged by the designer. Our mapping covers as well the database queries required to implement and check the model’s constraints. UmlToNoSQL takes care of integrating the different data storages, and provides a modeling layer that enables a transparent manipulation of the data using conceptual level information.

Our approach is based on existing works targeting the mapping of conceptual schemas to specific datastore technologies and integrates them in a unique multi-datastore design method. The main contributions of the paper are:

  • A model partitioning approach defined as a UML profile. With the profile, a designer can define groups of model elements that should be persisted together in a specific datastore.
  • A set of mappings from model regions to datastore-specific models, including a new mapping from UML class diagrams to document databases.
  • A translation approach from constraints and business rules to database-specific queries, also covering constraint expressions that require evaluating elements stored in different and heterogeneous backends.
  • A runtime modeling layer that automatically deploys the modeled application, and provides a high-level API to manipulate and check constraints on top of the underlying persistent storage mechanisms transparently.

As an example, the following figures show some excerpts of the contributions above. This work has been recently accepted at the RCIS conference. You can find additional details on our approach and its underlying mappings in the online version of the article available for free here.

Example of a UML model annotated with the Partition Profile

Example of a UML model annotated with the UML Partition Profile

DocumentDB Metamodel

DocumentDB Metamodel used to model the parts of the schema that will be stored in a Document database (PSM-level)

UMLtoNoSQL middleware showing how we can execute queries over the combination of (No)SQL datastores

UMLtoNoSQL middleware showing how we can execute queries over the combination of (No)SQL data stores

Pin It on Pinterest

Share This