This really depends on your requirements for "visualization". Typically most of the more interesting visual aspects of a diagram for a relational database are the high level relationships and integrity constraints (1:1, 1:many, primary key, foreign keys, etc).
MongoDB has flexible schema, in the sense that documents within a given collection do not have to comply with a predetermined format. That does not mean that the underlying data cannot have some organization .. just that there is no single schema imposed on a collection (as would be the case in a traditional relational database).
In MongoDB, a lot of the interesting details to visualize will require analysis by inspecting some or all of the documents in a collection OR by reviewing the code.
Code Review
If your application is using an ODM (Object Document Mapper) such as Mongoose (Node.js) or Morphia (Java), the application code may provide a quick and descriptive view of the intended schema (or at least the latest version of the intended schema). An appropriate language documentation tool such as jsdoc
or javadoc
may be helpful to generate a reasonable overview of your model classes. You will probably have to add some documentation annotations for best results.
Schema Analysis
Schema analysis is a more brute force approach which involves looking at the data in order to infer an observed schema. A common approach for this is to use Map/Reduce.
There are a few different mongo shell helpers that will give you an idea of the general structure of collections (eg. field/data types and their coverage in the source documents):
These aren't visual (in the graphical sense), but the schema analysis results do provide insight into the expected shape of the data and common variations.
Relationships
The MongoDB server does not have support for foreign key relationships, which removes a lot of potentially interesting visual annotations.
There are some different client driver approaches to creating Database References (DBRefs), but these are following usage conventions rather than a server feature. In order to determine relationships between collections using DBRefs, some or all of the documents in a collection would have to be scanned. Inference of relationships isn't supported by either variety
or schema.js
yet.
Content
To get a better idea of the actual content, you could try one of the Admin UIs.