MongoDB Features and Introduction
MongoDB is NoSQL Database which store the data in the forms of Document and collections. MongoDB is also called as schema less database where no relation is maintain between the data's as we see in Relational Database like MySQL, SQL Server, PostgreSQL.
In MongoDB we just need to pass on the key and value to store our data. So in others words we can say we only need to pass a JSON Object and MongoDB store as it is.
Example:-
{
“Name”: “John Doe”,
“Id”: “1”
}
Above JSON is an Example which is store in MongoDB
In MongoDB tables called as collection and the data inside the collection is called as documents. Documents consist of key-value pairs which are the basic unit of data in MongoDB. And each JSON object consist the unique object _id which maintain by the MongoDB itself the developer need not worry about this function
Important Components of MongoDB
- Database
- Collection
- documents
- fields
Database
This is container of collection where number collection stored in the single unit.
Collection
Collection referred as tables of MongoDB Database as we see table’s in relational Database so here collection is termed as tables of MongoDB database. Each collection consists N number documents.
Documents
Documents is termed as row or say records of Collection. Just like same as records which are stored in table in relational databases like MySQL. In short we can say that documents are records which stored inside the collection.
Fields
Fields referred as property of JSON object. let take example
{
“Name”: “John Doe”,
“Id”: “1”
}
Here in above example “Name” and “Id” are the fields of the documents records.
At Last MongoDB is very useful for storing the large number of Databases and which provides fast retrieval of Records.