What is MongoDB:
MongoDB is an open-source, document-oriented database that is easy to scale and develop.
Overview of MongoDB:
MongoDB is an open source database system. Open source means that, not only can you freely download the product, but you can also download the source code. It’s cross-platform; whether you’re a Linux, Windows user, you can install MongoDB on your operating system, and work in the environment that you’re already most comfortable with. Now this is different than some relational database management systems. MongoDB is a cross-platform, open-source document database.
It’s classified as a NoSQL database. We don’t have tables and columns, and we don’t have tables that are related to each other with foreign keys and primary keys. And we don’t use Structured Query Language, or SQL, to communicate with the database. It uses, instead, a document data model. A document is a single aggregate that brings together all the information relevant to a particular entity. Each record is a document. In a single document, we have their name, their age, and their employee type. MongoDB is classified as a NoSQL database.
A record is a document. An example of a record is
Each line is composed of field value pairs, and that’s what you see on the screen here. The field is name, the value is John. The next field is age, the value is 47, and so forth. Those values that you see on the screen currently are simple data types; a string or an integer. Values can include other documents, arrays, and arrays of documents.
Advantages of Documents:
An advantage is the reduced need for expensive joins. The document approach reduces our response time. There’s a dynamic schema. Unlike with the relational database model – where you have to establish your schema prior to entering data – with the document approach, you can add new documents that might have more or fewer field value pairs at any point.