Introduction
MongoDB is document-oriented, no sequel(No SQL) database. MongoDB replaces the concept of rows of conventional relational data models with something known as documents.
MongoDB offers developers the flexibility to work with evolving data models. Since it is document-based, it allows embedded documents, arrays and represents complex hierarchical relationships using a single record.
It is also schema-free, which means that the keys defined in the document are not fixed. As a result, massive data migration can be ruled out.
You must be wondering, how do we start using MongoDB? Keep reading, and we'll explain everything in this article. Let's start by understanding the meaning of some of the critical terms of MongoDB.
Key Terms of MongoDB
In SQL databases, the data is stored in tables, where the column denotes the attribute and the row denotes a particular record. These tables reside inside the databases. The SQL databases have a relational property where different tables are related to each other.
But as we already know, MongoDB is a NoSQL database. Let’s see how data is stored in MongoDB.
Database
A Database is a physical storage location for data. On the file system, each database has its collection of files. Multiple databases are commonly found on a single MongoDB server.
Collection
The term "collection" refers to a group of MongoDB documents. It's the same thing as an RDBMS table. Within a single database, there is a collection. Collections do not enforce a schema. Different fields can be found in different documents within a collection. In most cases, all of the documents in a collection serve the same or comparable purposes.
Document
A document consists of a collection of key-value pairs. The schema of documents is dynamic. Documents in the same collection don't have to have the same set of fields or structure, and standard fields in a collection's documents can contain different types of data.
Let’s get started with creating parts!