#Introduction
MongoDB is nosql databse and is an open-source document database that provides high performance, high availability, and automatic scaling.
Key Features
- High Performance
- Rich Query Language
- High Availability
- Horizontal Scalability
- Support for Multiple Storage Engines
Basic Structure
Databases -> Collections -> Documents
Each databses contains several collections, each record in collections is called as document. Below is the corresponding relationship in relational database.
Relational Database | NoSQL Database |
---|---|
Table | Collection |
Tuple | Document |
Document Types
Scalar Value Types
Below is part of the list of types.
Scalar Value Types |
---|
Double |
String |
Boolean |
Date |
Int |
For full list, please check the table
Array Types
Except scalar value type, the field can also take array as its type. The actors filed in below example is Array type.
Document(Object) Types
Also, field can take aggregated data strucutre as its type, like the imbd field below.
GUI Tool - Compass
Compass can be downloaded from download center.
Schema View
The compass will fetch a sample of documents to analyse field type and its range.