Javier Núñez Fernández Full Stack Web Engineer

MongoDB non-relational DB basics

MongoDB logo

A brief introduction to MongoDB

MongoDB is a non-relational database manager which stores records as JSON objects. MongoDB is also known as Document Oriented DB. All official documents can be found in MongoDB official page.

This feature gives the following advantages:

The applications communicate with MongoDB through Drivers. This drivers are the way MongoDB communicate with the main languages used on the web world. There are several drivers available for the main web application environments, and can be found in the official drivers page.

Example of document

Lets see an example of DB modeling with MongoDB. We need to store the information about our web application users. We may do this design:


{
   _id: "joe",
   name: "Hans",
   lastname: "Baker"
   address: {
              street: "123 Long Road Street",
              city: "New Town",
              state: "ZY",
              zip: "55555"
            }
}

In this example, you can see the embedded data in a typical MongoDB structure.

In other posts I will go deep in the MongoDB basics.