Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

MongoDB Cheat Sheet

MongoDB Cheat Sheet

Back to Databases
Updated 2026-04-21
Next Topic: MySQL Cheat Sheet

MongoDB is an open-source, document-oriented NoSQL database that stores data in flexible, JSON-like BSON documents. Known for horizontal scalability, rich querying, and a powerful aggregation framework, MongoDB is used by organizations ranging from startups to Fortune 500 companies. The current stable release is MongoDB 8.0 (GA October 2024), which introduces a new bulkWrite command across multiple collections, updateOne with sort, Queryable Encryption range queries, automatic compaction, per-CPU TCMalloc caches, and significant performance improvements. MongoDB Atlas, the fully managed cloud service, continues to expand with Atlas Vector Search, Atlas Stream Processing, and Atlas Search. This cheat sheet covers the complete MongoDB ecosystem from basic CRUD operations and query operators through advanced aggregation, indexing strategies, replication, sharding, security, and Atlas-specific features.

What This Cheat Sheet Covers

This topic spans 51 focused tables and 412 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: BSON Data TypesTable 2: CRUD Operations β€” InsertTable 3: CRUD Operations β€” Read (Query)Table 4: CRUD Operations β€” UpdateTable 5: CRUD Operations β€” DeleteTable 6: Comparison Query OperatorsTable 7: Logical Query OperatorsTable 8: Element Query OperatorsTable 9: Evaluation Query OperatorsTable 10: Array Query OperatorsTable 11: Bitwise Query OperatorsTable 12: Update Operators β€” FieldTable 13: Update Operators β€” ArrayTable 14: Aggregation Pipeline β€” Core StagesTable 15: Aggregation Pipeline β€” Advanced StagesTable 16: Aggregation Pipeline β€” Atlas and Diagnostic StagesTable 17: Aggregation AccumulatorsTable 18: Aggregation β€” Conditional and Utility OperatorsTable 19: Aggregation β€” Date OperatorsTable 20: Aggregation β€” String OperatorsTable 21: Aggregation β€” Array and Set OperatorsTable 22: Aggregation β€” Type and Conversion OperatorsTable 23: Aggregation β€” Math OperatorsTable 24: Window Function OperatorsTable 25: Index TypesTable 26: Index ManagementTable 27: Query OptimizationTable 28: Projection OperatorsTable 29: Cursor MethodsTable 30: Multi-Document TransactionsTable 31: ReplicationTable 32: Read PreferenceTable 33: ShardingTable 34: Write Concern LevelsTable 35: Bulk OperationsTable 36: Collection OperationsTable 37: Capped CollectionsTable 38: Schema ValidationTable 39: Time Series CollectionsTable 40: GridFSTable 41: Change StreamsTable 42: Text SearchTable 43: Geospatial QueriesTable 44: CollationTable 45: Views and On-Demand Materialized ViewsTable 46: Database CommandsTable 47: Security and AuthenticationTable 48: Backup and RestoreTable 49: MongoDB Atlas FeaturesTable 50: Performance Monitoring and ProfilingTable 51: Connection String and Pooling

Table 1: BSON Data Types

BSON TypeExampleDescription
Double
{ price: 19.99 }
β€’ 64-bit IEEE 754 floating point number
β€’ default numeric type in the shell
String
{ name: "MongoDB" }
UTF-8 encoded character string
Object
{ addr: { city: "NYC" } }
Embedded/nested BSON document
Array
{ tags: ["db", "nosql"] }
Ordered list of values of any BSON type
Binary Data
BinData(0, "data")
β€’ Arbitrary byte string
β€’ used for files, encrypted fields, UUIDs
ObjectId
ObjectId("507f1f77bcf86cd799439011")
β€’ 12-byte unique identifier
β€’ default _id type
β€’ contains timestamp
Boolean
{ active: true }
true or false value
Date
{ created: ISODate("2026-04-21") }
64-bit integer representing milliseconds since Unix epoch

More in Databases

  • MariaDB Cheat Sheet
  • MySQL Cheat Sheet
  • Amazon DynamoDB Cheat Sheet
  • Database Design Cheat Sheet
  • Firebase Realtime Database Cheat Sheet
  • PostgreSQL Cheat Sheet
View all 42 topics in Databases