MongoDB

Getting Started With MongoDB

In this article on Getting Started With MongoDB, I will introduce a NoSQL database called MongoDB. Basically, it is a document-oriented database that is widely used in creating scalable web applications.

Since it is a non-relational database, so it doesn’t contain rows and columns. Instead, it has document-oriented storage. We can create a database without schema. In other words, the schema is optional in MongoDB.

In order to install MongoDB on Windows, first, you need to visit the official MongoDB website and download the msi package.

Installing MongoDB Community Server

Getting Started With MongoDB - Installing The MongoDB Community Server
Getting Started With MongoDB – Installing The MongoDB Community Server

When it is downloaded, double click on the msi file to start the installation and click on he Next button.

The MongoDB Setup Wizard
The MongoDB Setup Wizard

Accept the License Agreement and click on the Next button.

MongoDB License Agreement
MongoDB License Agreement

When screen appears for choosing the setup, select the Complete option and click on the Next button.

MongoDB Setup Type
MongoDB Setup Type

The next screen displays the Service Configuration. Keep the default settings and press Next.

MongoDB Service Configuration
MongoDB Service Configuration

The next screen asks for installing MongoDB compass. It is a GUI client for MongoDB collections and helps in managing database, collections, and documents. So, check the Install MongoDB Compass option and press the Next button.

Installing MongoDB Compass
Installing MongoDB Compass

After that, click on the Install button on the next screen.

Installing MongoDB 5.0.9
Installing MongoDB 5.0.9
Close any open file
Close any open file
MongoDB Installation
MongoDB Installation

When installation is complete, click on the Finish button.

Installation is Complete
Installation is Complete

After that, you can launch MongoDB compass to create and manage databases. In order to learn to create a database, collections, and documents, click here.

Apart from using the MongoDB compass, we can also use MongoDB as the command line interpreter. More information on using CLI for MongoDB is available here. In order to access MongoDB database with PHP Script, we need to install MongoDB PHP Driver.


Further Reading

How to create a MongoDB database using PHP Script?

Working with MongoDB Compass

Create a collection in a MongoDB database in PHP

Insert Documents in a Collection

Show All Documents in a Collection

princites.com

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *