How to create collections

You can use the functionality "Objects" to create any number of collections. Just press the "New" button in the Objects window and select "Add an object to Mongo DB". This selection allows you to define a new object (a Mongo DB collection), field by field. Once of the perks of Mongo DB is the ability to add dinamically any number of fields by simply add them to existing or new collections. Same for collections: they must not be defined before their usage: the first time you insert a record, the collection is automatically defined.

The first step neeeded to create a collection is to define the object name and save the object. At this point, the second folder, related to the object fields will be enabled and you can add any number of fields. You cannot define the primary key: this is implicitelly defined by Mongo DB (the "id" field); that field identifies the single record store in the collection.

Last updated