MongoDB: How to represent a schema diagram in a thesis?
We found class diagrams to actually be one of the best ways to represent a mongo schema design.
It can capture most of the items that a document will have such as arrays, embedded objects and even references.
General guidelines we use to relate onto concepts to uml
Embed = Composition aggregation
Reference = Association class
If you're unfamiliar with the uml terminology then this is a decent intro.
UML intro from IBM site
There is a tool doing diagrams for MongoDb, is called DbSchema. It discovers the schema by scanning data from db. I would also suggest trying two features from them :
- virtual relations which allow exploring data from different collections in the same time. A kind of JOIN between different collections.
- HTML documentation, we use it in presentations as well - the comments are in mouse-over ( diarams are saved as vector images ).