MongoDB is a Database Management System (DBMS). This means that it is a software which stores data in a database and allows one to interact with the data by changing it or displaying it.
MongoDB also makes use of the NoSQL principle to store its data. This means that each object which is stored within the database may have a different structure.
Architecture

MongoDB categorizes each database with a number of collections. A collection is the Relational Database equivalent of a table. So, for example, you would have a “Student” collection which groups all the data items defining students.
Each collection consist of a number of documents. Documents are the Relational Database equivalent of records. A single document in a Mongo Database is nothing more than a JSON object.
JSON
JSON (pronounced “Jason”) is an object oriented way of representing data. The main concept is that an object is between curly braces “{}” and properties of this object are a set of key/value pairs.
For example:
{
student_number: 415324,
name: "Susan",
surname: "Strong",
does_dancing: "yes",
has_work_experience: "no"
}
The JSON above is a representation of a single object. This object properties various properties. One of these properties is a “name” and the value of the name is “Susan.”
It is also possible to have more than one of these objects at a time. This is called an array of objects, and the way which it is represented is with square brackets “[ ] “. Each object is separated by commas. See below an example of two student objects in the same array.
[
{
student_number: 415324,
name: "Susan",
surname: "Strong",
does_dancing: "yes",
has_work_experience: "no"
},
{
student_number: 9826421,
name: "John",
surname: "Smith",
supervisor: "Prof Clev R. Guy",
beers_per_day: 3
}
]
GeoJSON
When it comes to Geographical information, a special form of JSON is used by MongoDB to store the data. This standard is called GeoJSON. This is what it would look like:
{
"_id":"5cc1a372c8821f2d36c0ff23",
"type":"Feature",
"properties":{
"is_road" : "yes",
"is_restaurant" : "no"
"name" : "Some Main Highway"
},
"geometry":{
"type":"LineString",
"coordinates":[
[
24.90006459611627,
-25.894381996640988
],
[
24.9012897961161,
-25.894498096640962
],
[
24.905121396115568,
-25.895321796640868
]
]
}
}
The part which makes this JSON object a GeoJSON object is the “geometry” part. It always has a type such as LineString, Point, Polygon, etc.
There is also a list of coordinates which are an array of latitudes and longitudes.