

You can then create a new collection by clicking Create collection, which will prompt you to give the new collection a name ( Figure D).įigure D Naming a new collection for our database.Ĭlick Create Collection and you’ll be sent back to the database window. The initial collection is a requirement, but you are not limited to a single collection in the database.Īfter the database is created, click on it in the database listing and you’ll see the initial collection listed ( Figure C).įigure C We’ve created our first database along with an initial collection. This will create an initial collection in your new database. Not only will you be asked to give your new database a name, but also a collection name. You will then be prompted to name your new database ( Figure B).įigure B Naming our new database in Compass. In the resulting window, click Create database. Log into Compass and then click the Databases entry in the sidebar ( Figure A).įigure A The Compass GUI makes working with your databases incredibly simple. The first thing we’ll do is create a database that will house our collection. With those two pieces of the puzzle taken care of, it’s time to create your first database. I will assume you’ve already deployed MongoDB and Compass (read the how-to in the link above for more information). Collections are to MongoDB what a table is to a relational database (such as MySQL). For those who don’t know, a collection is a NoSQL term that refers to a group of MongoDB documents. I want to show you just how easy it is to create a MongoDB database and then add a collection.

SEE: Hiring Kit: Database engineer (TechRepublic Premium) The Compass GUI makes it very easy to create and manage your MongoDB databases. Now that you have the MongoDB Compass GUI installed, you might be wondering what you can do with it? The answer is pretty simple-just about anything you need. Red Hat Enterprise Linux 9 Beta is out and is ready to take your servers to new heights What is a container? Your guide to understanding containers
Update mongodb compass how to#
How to choose a database (hint: boring is good) Image: Shutterstock More about data centers Jack Wallen shows you how easy it is to create a MongoDB database and collection using the Compass GUI. How to create a database and add a collection with MongoDB GUI Compass
