M001: MongoDB Basics

Day #4 Hi Y'all Hope you are enjoying the journey

My M001 Study Guide

Keep it up everybody

By: Jason Daniel Nutt...a MongoNutt!

M001: MongoDB Basics

Learn the fundamentals of the MongoDB database.

What is it??

It is a database that is specifically a NoSQL type of database:

NoSQL

A database that is NoSQL is a generic way of saying that it is a datastore that does NOT use a legacy approach of related tables of data.

That means you're storing your data in an organized way but you are not using rows and columns...Examples are: a library card catalog or a more sophisticated data store like MongoDB

Since the range of what NoSQL databases are is so vast, we have to narrow the definition further to encapsulate what MongoDB is...

MongoDB is a NoSQL document database. Which is to say that data in MongoDB is stored as documents. More on that later.

Documents in MongoDB are stored into collections of documents, that is why MongoDB is categorized as a NoSql Document database.

Next up: What is a document?

A document is an organized way to store data as a set of field value pairs.

What is a collection?

A collection is an organized store of documents in MongoDB, usually with common fields between documents.

What are field value pairs?

A field is a unique identifier for a specific datapoint...Each field has a value associated with it.

What is MongoDB Atlas?

MongoDB cloud Atlas is our database in the cloud for this course and beyond. MongoDB is used at the core of Atlas for data storage and retrieval.

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

a single machine locally or in the cloud, running a certain software, in our case it is the MongoDB database.

Cluster

group of servers that store your data.

Sorry I had to get a coffee

Let's continue...

Atlas users can deploy clusters

Clusters are groups of servers that store your data.

These servers are configured into what we call a replica set in MongoDB.

Which is a set of a few connected MongoDB instances that store the same data

An instance is a single machine, locally or in the cloud, running a certain software. In this case, it is the MongoDB database being run in the

cloud.

This setup ensures that if something happens to ONE of the machines in the replica set, then the data will remain in tact and available for use in the application by the other remaining working members of the replica set. So...Every time you make changes to a document or a collection, redundant copies of that data are stored within the

replica set.

When you deploy your cluster for the course I am documenting, it will automatically configure as a

replica set.

Atlas manages the details of creating clusters for you, which simplifies the operational overhead of running a database deployment

Runs and Mantains database deployment

Atlas is a great way to experiment with new tools and features

Atlas User Interface Overview