Tool to create a visualization from existing MongoDB [closed]

孤者浪人 提交于 2019-12-31 10:43:15

问题


I took over a project with existing MongoDB. I would like to get visual image (diagram etc) of the existing data. Obviously MongoDB is pretty different case compared to MySQL but I guess there is still something that can be visualized?


回答1:


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):

  • schema.js

  • variety

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.




回答2:


You Can use Mongo3 or futon4mongo and MogoVue is best for this.

And whole documented list of tools are here.




回答3:


I have used mViewer which I found really simple and good.

A simple web-based Administration and Management Tool for MongoDB here is the link

https://github.com/Imaginea/mViewer



来源:https://stackoverflow.com/questions/12386547/tool-to-create-a-visualization-from-existing-mongodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!