MongoDB Index Modeler

☰ menu
× Create Model Clear Model Load from File Save to File

Introduction

Welcome to the MongoDB Index Modeler. This utility creates a data model with one or more virtual Collections, allowing users to visualize how relational data might be stored and indexed in MongoDB in order to help design efficient schema for their applications.

The data displayed by the MongoDB Index Modeler is stored locally in memory, allowing complex data models to be constructed and visualized without requiring software to be installed locally or infrastructure to be deployed in the cloud. Unlike other tools for visualizing data, the MongoDB Index Modeler is designed specifically to model NoSQL data and dooes not assume that the items being displayed are homogenous in nature. Virtual Collection may contain many types of items as a single aggregated view representing a MongoDB data model.

Getting Started

To get started with a new model, clibk the 'menu' link in the upper right corner of the page and select 'Create Model' from the slide out menu which will then appear on the left side of the screen. To import an existing model use the 'Load Model' option. When 'Create Model' is selected you will be prompted to provide a Model Name, Author and Description and then asked to define the first Collection in the Data Model. When a new Collection is defined, the MongoDB Index Modeler wiill build an empty Collection with a single Document that looks similar to the following image:



This view represents the default index on the '_id' attribute. All documents in this view will be sorted by this value. When a new Model is defined, the mongoDB Index Modeler will initially display an empty Collection with a single Document identified as '~new~', Click the in the '_id' cell of the document you wish to edit or simply change the values in the wide column view if you want to set one of the top level document attributes with a String value.


The "type' attribute is mandatory for all Documents as it is used to identify which attributes should be associatyed with a new Document. When you set the 'type' attribute of a document, the Index Modeler will check to see if other Documents of this type already exist in the Model and if they do then the associated attributes for that Document Type will be automatically appended.


To add new Documents to the model click the button in the lower right corner of the cell labeled 'Index Keys' located in the table header.


To add an Index to the model click the button in the upper right corner of the tab labeled with your C6ollection Name located at the top left of the table. On the form you will need to provide a comma separated list of attributes to be indexed and a name for the Index to be created. The MongoDB Index Modeler supports indexing of both nested Document attributes and Multi-key (Array) values. Here is a sample model for a simple Adjacency List which demonstrates this feature:



This tool is a work in progress and there are probably a few bugs that have not been identified. If something unexpected happens you can undo a change by clicking the button on the right side of the 'Attributes' cell in the table header.


Additional functionality and documentation will be added over time.