What is MongoDB and what are its key features?

Beginner

Answer

MongoDB is a document-oriented NoSQL database that stores data in flexible, JSON-like documents called BSON (Binary JSON). Key features include:

  • Document-based storage: Data is stored in documents rather than rows and columns
  • Schema flexibility: Documents in a collection can have different structures
  • Horizontal scalability: Built-in support for sharding across multiple servers
  • Rich query language: Supports complex queries, indexing, and aggregation
  • High availability: Replica sets provide automatic failover
  • GridFS: For storing large files
  • ACID transactions: Support for multi-document transactions