MongoDB Basics
Class: M001 Created: June 6, 2021 12:08 AM Created by: Thwin Htet Win
What is Database
- A database is a structured way to store and access data.
What is NoSQL Database
- A database that stores data in an organizing way without using table.
What is MongoDB Database
- MongoDB is a NoSQL document database.
- Data are stored as documents.
- Documents are turn stored in what we called collections.
- Collection is an organized store of documents in MongoDB usually with common fields between documents.
- MongoDB database would contain multiple collections where they would contains multiple documents.
What is document in MongoDB
- A way to organize and store data as a set of field-value pairs.
- Field is an unique identifier for a datapoint.
- Value is a data related to a given field ( identifier ).
{ <field> : <value>, "name" : "Alice", "age" : 19}
Replica Set
a few connected machines that store the same data to ensure that if something happens to one of the machines the data will remain intact. Comes from the word replicate - to copy something.
Instance