How To Create a Database in MongoDB
Create a Database in MongoDB MongoDB is a NoSQL, open-source document database that is created using C++. It is different from other Relational Databases like MySQL and is very high-performance in nature. One of the most important characteristics of NoSQL databases like MongoDB is that they have no schema. That is, unlike SQL, we do not specify a structure for the tables/databases. MongoDB uses documents and collections instead of rows and tables like SQL. In this article, we will discuss how to create databases in MongoDB since it does not contain a “create database” option. The Use Command:- Before diving into creating and deploying a database, let us understand the basics of MongoDB commands. The use DATABASE_NAME command in MongoDB is used to create a database if it does not exist, else, it returns to the already existing database. Let us now see the syntax of this use command in MongoDB. Syntax of Use Command:- The use command in MongoDB is defined using the following s...