MongoDB uses JSON like document and schema. Popularly MongoDB is used in MERN (MongoDB+ExpressJs+React&Redux+ NodeJs) and MEAN (MongoDB+ExpressJs+AngularJs+ NodeJs) Stacks.
To work on MongoDB basic knowledge or idea of database, text editors will be required. Having an understanding of RDBMS (Relational Database Management System) will be an added advantage.
Common Terms of MongoDB
There are mainly 5 terms you need to know in MongoDB
- Documents – A document (Similar to Tuple/Row in RDBMS) can be defined as a set of key-value pairs. Documents hold dynamic schema. When we say dynamic schema it means that documents in the same collection do not need to have the same set of fields and structure. Common fields in a collection’s documents may hold different types of data.
- Collections- Collection (Similar to Table in RDBMS) is a group of documents. A collection exists within a single database. Collection does not enforce a schema. Document within a collection can have different fields. Typically, all documents in a collection are of similar purpose.
- Others – Fields in MongoDB is similar to column in RDBMS, Primary key is provided as key_id and provided by MongoDB itself. Embedded documents in MongoDB are equivalent to Table Join in RDBMS.
- Anybody attribute can be indexed.
- Data is stored in JSON style documents and can directly be used on multiple platforms.
- Supports Auto Shredding
- Replication can be done easily
- Faster in-place updates.
- Simplified Joins
- Easily structure a single object.
- Easily to scale
- Mapping of application objects to database objects is not required.
- It uses internal memory to store the working set, which enables faster data access.
- Deep query-ability
- Huge online community for professional support.