SlideShare a Scribd company logo
1 of 23
UmlTo[No]SQL: Mapping Conceptual
Schemas to Heterogeneous Datastores
Gwendal Daniel, Abel Gómez, Jordi Cabot
1
Why Heterogeneous Datastores?
 Many data storage solutions
 Relational databases are still massively used
 > 250 solutions in the only family of NoSQL databases
 Efficient data storage and processing solutions
 Specific representations
 Graphs, Documents, Key-Values …
 Flexible schemas, high scalability, availability …
 Specific use cases
 Atomic accesses, highly-connected data, temporal versioning …
2
Why Heterogeneous Datastores?
 Applications use multiple solutions to maximize their benefit
 Multi-store infrastructure
 Cloud-based data storage
 Add new features stored in new databases
3
So what’s the problem?
 Defining such applications is a complex task
 Need to take into account multiple storage types
 Query languages
 Data representation
 Implicit schemas
 Manually implemented in the application
 The elephant in the room: query multiple data sources
4
Conceptual Modeling to the rescue
Several solutions to map conceptual schemas to specific data stores
 UML/ER to Relational DB
 UML to GraphDB
 UML to HBase
Limited support for multi-store systems
 Split data in multiple storage solutions
 Integrity constraints
 Uniform data access
5
UmlTo[No]SQL
 MDA approach for multi-store systems
 From UML/OCL
 Conceptual schema partitioning
 « Logical » schema generation
 Constraint to query translation
 Code generation
6
UmlTo[No]SQL – Starting Point
Conceptual schema
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
Integrity constraints
7
UmlTo[No]SQL – Model Partitioning
 Model partitioning
 UML profile
 Use packages to define regions over the
model
 Provide datastore-specific information:
relational, document, etc
 Defined at the element level
8
UmlTo[No]SQL – Logical Schema
 Metamodels representing families of data stores
Relational Metamodel
9
UmlTo[No]SQL – Logical Schema
 Metamodels representing families of data stores
Graph Metamodel
10
UmlTo[No]SQL – Logical Schema
 Metamodels representing families of data stores
Document Metamodel
11
UmlTo[No]SQL – Logical Schema
 Model Transformations
 (Annotated) class diagram to
 Relational metamodel
 Graph metamodel
 Document metamodel
 A common UUID type to represent cross-datastore associations
 Optional transformations from family metamodel to specific platform
 E.g. DocumentDB to MongoDB / GraphDB to Neo4j
 Integrate advanced optimizations (indexes, specific data structures, etc)
12
UmlTo[No]SQL – Mapping Constraints
 Model Transformations
 Metamodels for specific query languages
 Single datastore constraints mapping
 OCL → SQL
 OCL → Gremlin
 OCL → MongoQL
13
UmlTo[No]SQL - Mapping Constraints
 Model Transformations
 Cross-datastore constraints mapping
 Split the query into datastore-specific sub-queries
 Generate intermediate variables to store the results
 Join functions based on the UUID datatype
14
UmlTo[No]SQL - Mapping Constraints
Cross-Datastore Query Metamodel
15
UmlTo[No]SQL - Mapping Constraints
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
16
UmlTo[No]SQL - Mapping Constraints
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
17
Client.allInstances().orders orders->select(o | not o.paid).size() < 3
UmlTo[No]SQL - Mapping Constraints
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
18
Client.allInstances().orders orders->select(o | not o.paid).size() < 3
sql_orders := select order_id from orders where
client_id in (select id from client)
UmlTo[No]SQL - Mapping Constraints
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
19
Client.allInstances().orders orders->select(o | not o.paid).size() < 3
sql_orders := select order_id from orders where
client_id in (select id from client)
mongo_orders := relToDoc(sql_orders)
UmlTo[No]SQL - Mapping Constraints
context Client inv maxUnpaidOrders:
self.orders->select(
o | not o.paid)
->size()< 3
20
Client.allInstances().orders orders->select(o | not o.paid).size() < 3
sql_orders := select order_id from orders where
client_id in (select id from client)
db.order.find({_id : {$in: mongo_orders},
$where : “!o.paid"}).length > 3
mongo_orders := relToDoc(sql_orders)
UmlTo[No]SQL – Code Generation
 Deploy the database
 Relational world: DDL scripts
 NoSQL world: configuration scripts when possible
 Runtime data access
 Custom data access API
 From conceptual model (e.g. getClient, createOrder)
 Manages the concrete datastore
 Constraint checking
 Native query execution
 Query orchestration for cross-datastore constraints
21
Conclusion
 Top-down approach for multi-database application design
 Model partitioning
 Region mapping
 Constraint mapping (including cross-datastore)
 Code generation + runtime data access
22
Future Work
 Performance evaluation
 Integrate existing cross-datastore query languages
 CloudMdsQL, Apache Drill …
 Automatic Schema partitioning
 Reverse direction is also promising: extracting conceptual schemas from
heterogeneous datastores
 Applications in legacy systems / open data / …
23

More Related Content

What's hot

Intro to Feature Selection
Intro to Feature SelectionIntro to Feature Selection
Intro to Feature Selection
chenhm
 

What's hot (20)

الوحدة السادسة - قاعدة البيانات وادارتها
الوحدة السادسة - قاعدة البيانات وادارتهاالوحدة السادسة - قاعدة البيانات وادارتها
الوحدة السادسة - قاعدة البيانات وادارتها
 
Gestion des données d'entreprise à l'ère de MongoDB et du Data Lake
Gestion des données d'entreprise à l'ère de MongoDB et du Data LakeGestion des données d'entreprise à l'ère de MongoDB et du Data Lake
Gestion des données d'entreprise à l'ère de MongoDB et du Data Lake
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests
 
Si bdd
Si bddSi bdd
Si bdd
 
Scaling and Normalization
Scaling and NormalizationScaling and Normalization
Scaling and Normalization
 
Sgbdr merise
Sgbdr meriseSgbdr merise
Sgbdr merise
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
 
Introduction aux bases de données
Introduction aux bases de donnéesIntroduction aux bases de données
Introduction aux bases de données
 
Inverted index
Inverted indexInverted index
Inverted index
 
2.5 backpropagation
2.5 backpropagation2.5 backpropagation
2.5 backpropagation
 
The vector space model
The vector space modelThe vector space model
The vector space model
 
Formation Google Drive
Formation Google DriveFormation Google Drive
Formation Google Drive
 
Naive Bayes Classifier
Naive Bayes ClassifierNaive Bayes Classifier
Naive Bayes Classifier
 
Intro to Feature Selection
Intro to Feature SelectionIntro to Feature Selection
Intro to Feature Selection
 
Introduction NoSql 201406 - lbroudoux
Introduction NoSql 201406 - lbroudouxIntroduction NoSql 201406 - lbroudoux
Introduction NoSql 201406 - lbroudoux
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Tp Sql Server Integration Services 2008
Tp  Sql Server Integration Services  2008Tp  Sql Server Integration Services  2008
Tp Sql Server Integration Services 2008
 
Bloom filter
Bloom filterBloom filter
Bloom filter
 
Feature Engineering in Machine Learning
Feature Engineering in Machine LearningFeature Engineering in Machine Learning
Feature Engineering in Machine Learning
 

Similar to UMLtoNoSQL : From UML domain models to NoSQL Databases

Oracle data integrator project
Oracle data integrator projectOracle data integrator project
Oracle data integrator project
Amit Sharma
 
Ado.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworksAdo.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworks
Luis Goldster
 
Introduction to asdfghjkln b vfgh n v
Introduction to asdfghjkln b vfgh n    vIntroduction to asdfghjkln b vfgh n    v
Introduction to asdfghjkln b vfgh n v
23mz02
 
JovianDATA MDX Engine Comad oct 22 2011
JovianDATA MDX Engine Comad oct 22 2011JovianDATA MDX Engine Comad oct 22 2011
JovianDATA MDX Engine Comad oct 22 2011
Satya Ramachandran
 

Similar to UMLtoNoSQL : From UML domain models to NoSQL Databases (20)

Module02
Module02Module02
Module02
 
Oracle data integrator project
Oracle data integrator projectOracle data integrator project
Oracle data integrator project
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
Dbms presentaion
Dbms presentaionDbms presentaion
Dbms presentaion
 
Analysis Services en SQL Server 2008
Analysis Services en SQL Server 2008Analysis Services en SQL Server 2008
Analysis Services en SQL Server 2008
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Ado.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworksAdo.net &amp; data persistence frameworks
Ado.net &amp; data persistence frameworks
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
Day5
Day5Day5
Day5
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
Introduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQLIntroduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQL
 
Introduction to asdfghjkln b vfgh n v
Introduction to asdfghjkln b vfgh n    vIntroduction to asdfghjkln b vfgh n    v
Introduction to asdfghjkln b vfgh n v
 
JovianDATA MDX Engine Comad oct 22 2011
JovianDATA MDX Engine Comad oct 22 2011JovianDATA MDX Engine Comad oct 22 2011
JovianDATA MDX Engine Comad oct 22 2011
 
Homework help on oracle
Homework help on oracleHomework help on oracle
Homework help on oracle
 
MS SQL Server: Data mining concepts and dmx
MS SQL Server: Data mining concepts and dmxMS SQL Server: Data mining concepts and dmx
MS SQL Server: Data mining concepts and dmx
 
MS SQL SERVER: Data mining concepts and dmx
MS SQL SERVER: Data mining concepts and dmxMS SQL SERVER: Data mining concepts and dmx
MS SQL SERVER: Data mining concepts and dmx
 
SALES BASED DATA EXTRACTION FOR BUSINESS INTELLIGENCE
SALES BASED DATA EXTRACTION FOR BUSINESS INTELLIGENCESALES BASED DATA EXTRACTION FOR BUSINESS INTELLIGENCE
SALES BASED DATA EXTRACTION FOR BUSINESS INTELLIGENCE
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 

More from Jordi Cabot

More from Jordi Cabot (20)

AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?
 
Model-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesModel-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architectures
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart software
 
Modeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineModeling should be an independent scientific discipline
Modeling should be an independent scientific discipline
 
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
 
How to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortHow to sustain a tool building community-driven effort
How to sustain a tool building community-driven effort
 
All Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursAll Researchers Should Become Entrepreneurs
All Researchers Should Become Entrepreneurs
 
The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21The Software Challenges of Building Smart Chatbots - ICSE'21
The Software Challenges of Building Smart Chatbots - ICSE'21
 
Low-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringLow-code vs Model-Driven Engineering
Low-code vs Model-Driven Engineering
 
Lessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platformLessons learned from building a commercial bot development platform
Lessons learned from building a commercial bot development platform
 
Future Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingFuture Trends on Software and Systems Modeling
Future Trends on Software and Systems Modeling
 
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosIngeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulos
 
Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit Chatbot Tutorial - Create your first bot with Xatkit
Chatbot Tutorial - Create your first bot with Xatkit
 
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
Création facile de chatbots - Créez votre chatbot en 20 minutes avec une plat...
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
 
WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsWAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIs
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
Temporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformTemporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platform
 
Multi-Platform Chatbot Modeling and Deployment with the Xatkit Framework
Multi-Platform Chatbot Modeling and Deployment with the Xatkit FrameworkMulti-Platform Chatbot Modeling and Deployment with the Xatkit Framework
Multi-Platform Chatbot Modeling and Deployment with the Xatkit Framework
 

Recently uploaded

Recently uploaded (20)

Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 

UMLtoNoSQL : From UML domain models to NoSQL Databases

  • 1. UmlTo[No]SQL: Mapping Conceptual Schemas to Heterogeneous Datastores Gwendal Daniel, Abel Gómez, Jordi Cabot 1
  • 2. Why Heterogeneous Datastores?  Many data storage solutions  Relational databases are still massively used  > 250 solutions in the only family of NoSQL databases  Efficient data storage and processing solutions  Specific representations  Graphs, Documents, Key-Values …  Flexible schemas, high scalability, availability …  Specific use cases  Atomic accesses, highly-connected data, temporal versioning … 2
  • 3. Why Heterogeneous Datastores?  Applications use multiple solutions to maximize their benefit  Multi-store infrastructure  Cloud-based data storage  Add new features stored in new databases 3
  • 4. So what’s the problem?  Defining such applications is a complex task  Need to take into account multiple storage types  Query languages  Data representation  Implicit schemas  Manually implemented in the application  The elephant in the room: query multiple data sources 4
  • 5. Conceptual Modeling to the rescue Several solutions to map conceptual schemas to specific data stores  UML/ER to Relational DB  UML to GraphDB  UML to HBase Limited support for multi-store systems  Split data in multiple storage solutions  Integrity constraints  Uniform data access 5
  • 6. UmlTo[No]SQL  MDA approach for multi-store systems  From UML/OCL  Conceptual schema partitioning  « Logical » schema generation  Constraint to query translation  Code generation 6
  • 7. UmlTo[No]SQL – Starting Point Conceptual schema context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 Integrity constraints 7
  • 8. UmlTo[No]SQL – Model Partitioning  Model partitioning  UML profile  Use packages to define regions over the model  Provide datastore-specific information: relational, document, etc  Defined at the element level 8
  • 9. UmlTo[No]SQL – Logical Schema  Metamodels representing families of data stores Relational Metamodel 9
  • 10. UmlTo[No]SQL – Logical Schema  Metamodels representing families of data stores Graph Metamodel 10
  • 11. UmlTo[No]SQL – Logical Schema  Metamodels representing families of data stores Document Metamodel 11
  • 12. UmlTo[No]SQL – Logical Schema  Model Transformations  (Annotated) class diagram to  Relational metamodel  Graph metamodel  Document metamodel  A common UUID type to represent cross-datastore associations  Optional transformations from family metamodel to specific platform  E.g. DocumentDB to MongoDB / GraphDB to Neo4j  Integrate advanced optimizations (indexes, specific data structures, etc) 12
  • 13. UmlTo[No]SQL – Mapping Constraints  Model Transformations  Metamodels for specific query languages  Single datastore constraints mapping  OCL → SQL  OCL → Gremlin  OCL → MongoQL 13
  • 14. UmlTo[No]SQL - Mapping Constraints  Model Transformations  Cross-datastore constraints mapping  Split the query into datastore-specific sub-queries  Generate intermediate variables to store the results  Join functions based on the UUID datatype 14
  • 15. UmlTo[No]SQL - Mapping Constraints Cross-Datastore Query Metamodel 15
  • 16. UmlTo[No]SQL - Mapping Constraints context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 16
  • 17. UmlTo[No]SQL - Mapping Constraints context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 17 Client.allInstances().orders orders->select(o | not o.paid).size() < 3
  • 18. UmlTo[No]SQL - Mapping Constraints context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 18 Client.allInstances().orders orders->select(o | not o.paid).size() < 3 sql_orders := select order_id from orders where client_id in (select id from client)
  • 19. UmlTo[No]SQL - Mapping Constraints context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 19 Client.allInstances().orders orders->select(o | not o.paid).size() < 3 sql_orders := select order_id from orders where client_id in (select id from client) mongo_orders := relToDoc(sql_orders)
  • 20. UmlTo[No]SQL - Mapping Constraints context Client inv maxUnpaidOrders: self.orders->select( o | not o.paid) ->size()< 3 20 Client.allInstances().orders orders->select(o | not o.paid).size() < 3 sql_orders := select order_id from orders where client_id in (select id from client) db.order.find({_id : {$in: mongo_orders}, $where : “!o.paid"}).length > 3 mongo_orders := relToDoc(sql_orders)
  • 21. UmlTo[No]SQL – Code Generation  Deploy the database  Relational world: DDL scripts  NoSQL world: configuration scripts when possible  Runtime data access  Custom data access API  From conceptual model (e.g. getClient, createOrder)  Manages the concrete datastore  Constraint checking  Native query execution  Query orchestration for cross-datastore constraints 21
  • 22. Conclusion  Top-down approach for multi-database application design  Model partitioning  Region mapping  Constraint mapping (including cross-datastore)  Code generation + runtime data access 22
  • 23. Future Work  Performance evaluation  Integrate existing cross-datastore query languages  CloudMdsQL, Apache Drill …  Automatic Schema partitioning  Reverse direction is also promising: extracting conceptual schemas from heterogeneous datastores  Applications in legacy systems / open data / … 23