>> These slides were presented at SiriusCon Paris 2016, on November 15th.
While the concept of database schema plays a central role in Relational Database systems, most NoSQL systems are schemaless: these databases are created without having to formally define its schema, that remains implicit in the stored data. This lack of schema definition offers a greater flexibility, but this comes at the cost of losing some of the benefits provided by schemas (such as type checking and integrity checking).
We use a MDE-based reverse engineering approach for inferring the schema of aggregate-oriented NoSQL databases was obtained. However, in the NoSQL context, the definition of a unique schema is not enough to accurately describe the stored data: different versions of the same object type coexist in the database, leading to different schema versions. In this talk we show a modeling transformation chain designed to obtain these schema versions from an input database, and a visualization tool for these schemas is defined using Sirius.
The visualization tool offers several viewpoints. The tree viewpoint allows the user to navigate between domain concepts such as Schema version, Entity, and Entity version. From this viewpoint it is possible to navigate to other diagrams such as the global schema viewpoint. Now for each inferred version schema, a couple of viewpoints are provided to analyze all the objects contained on the schema. Finally, a simple viewpoint is designed to inspect standalone Entities.
This is the basis of a future NoSQL Schema editor that will allow users to graphically perform database schema changes and database migration.
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
SiriusCon2016 - Visualization of Inferred Versioned Schemas from NoSQL Databases
1. Visualization of Inferred Versioned Schemas
from NoSQL Databases
Alberto Hernández Chillón Diego Sevilla Ruiz Jesús García Molina
alberto.hernandez1@um.es dsevilla@ditec.um.es jmolina@um.es
Cátedra SAES-UMU
University of Murcia
Faculty of Computer Science
University of Murcia
Faculty of Computer Science
University of Murcia
November 15, 2016
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 1 / 41
2. About the authors
Member of the Cátedra SAES team since 2014
M.Sc. in Computer Science from the UM
MDE, automatic code generation, NoSQL databases
Associate professor at the Faculty of Computer Science of the UM
M.Sc and Ph.D. in Computer Science from the UM
NoSQL databases, distributed systems, testing
Professor at the Faculty of Computer Science of the UM since 1984
Head of the Modelum Group
MDE, DSL, Software modernization, reverse engineering
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 2 / 41
3. Index
1 Introduction and context
2 Inference process
3 Schema visualization
4 Conclusions and future work
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 3 / 41
4. Index
1 Introduction and context
2 Inference process
3 Schema visualization
4 Conclusions and future work
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 4 / 41
10. Proposed objective
A DataVersity report (2015) indicated essential functionality
required in the near future:
Model visualization
Code generation from schemas
Metadata management
Our goal is to design and implement a tool which will allow us
to visualize NoSQL schemas:
Taking into account concepts such as versions...
...having in mind the underlying inference process...
...among other things
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 10 / 41
11. Index
1 Introduction and context
2 Inference process
3 Schema visualization
4 Conclusions and future work
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 11 / 41
19. Schema versions (II)
Schema version for Book_2
...
{
"_id": "89",
"type": "Book",
"title": "Book_2",
"hasAuthors":
[{
"_id": "77",
"type": "Author",
"name": "Author_77",
"hasCompany":
[{
"_id": "61",
"type": "Company",
"name": "Company_61 ",
"country": "Country_2"
}]
}]
}
...
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 19 / 41
20. Schema versions (III)
Schema version for Author_2
...
{
"_id": "99",
"type": "Author",
"name": "Author_2",
"company": "Company_3",
"country": "Country_3"
}
...
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 20 / 41
21. Index
1 Introduction and context
2 Inference process
3 Schema visualization
4 Conclusions and future work
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 21 / 41
22. Schema visualization
Why using Sirius?
Views we need:
General tree view
Global schema view
Schema version views
Entity detail view
Ability to create different viewpoints and navigability
mechanisms between them
Automatic generation of an embedded editor in the Eclipse
environment
Extensibility
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 22 / 41
24. Schema visualization - Input model
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 24 / 41
25. Schema visualization - Tree viewpoint (I)
Schema versions grouped by Entity
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 25 / 41
26. Schema visualization - Tree viewpoint (II)
Schema versions grouped by Version
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 26 / 41
27. Schema visualization - Tree viewpoint (III)
List of Entities, Versions and Properties
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 27 / 41
28. Schema visualization - Global schema (I)
Diagram of Entities, Versions and Properties
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 28 / 41
29. Schema visualization - Global schema (II)
Implementation of the Global schema
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 29 / 41
30. Schema visualization - Schema version (I)
Schema version root and its associations
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 30 / 41
31. Schema visualization - Schema version (II)
Implementation of the Schema view
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 31 / 41
32. Schema visualization - Schema version (III)
Variation with embedded direct associations
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 32 / 41
33. Schema visualization - Schema version (IV)
Implementation of the Schema view
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 33 / 41
34. Schema visualization - Entity detail
Entity detail with its Versions associations
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 34 / 41
36. Index
1 Introduction and context
2 Inference process
3 Schema visualization
4 Conclusions and future work
Alberto H.C. & Diego S.R. & Jesús G.M. NoSQL Visualization November 15, 2016 36 / 41
37. To sum up (I)
About Sirius...
Built in the Eclipse Modeling Framework
Easily deployable along with the metamodel into plugins
Different viewpoints, layers and customization options
Less development time and easier to extend
AQL might be quite tricky sometimes when defining actions
Learning curve for creating complex examples may be too harsh
? Language/model maintenance and evolution
? Managing large input models
Alberto H.C. Diego S.R. Jesús G.M. NoSQL Visualization November 15, 2016 37 / 41
38. To sum up (II)
About the tool...
We developed one of the first approaches for NoSQL
visualization considering versions
Tool to visualize NoSQL database schemas and schema versions
with Sirius
Tree viewpoint and global schema viewpoint
Schema version and entity detail viewpoint
...but there is still a lot of work to do:
Polish the NoSQL_Schema metamodel
Improve the Sirius viewpoint definitions
Implement the editor functionality
Alberto H.C. Diego S.R. Jesús G.M. NoSQL Visualization November 15, 2016 38 / 41
39. Future work (I) - DB alterations
Alberto H.C. Diego S.R. Jesús G.M. NoSQL Visualization November 15, 2016 39 / 41
40. Future work (II) - DB migration
Alberto H.C. Diego S.R. Jesús G.M. NoSQL Visualization November 15, 2016 40 / 41