Answer: MongoDB is a NoSQL database that stores data in a flexible, JSON-like format called BSON. Unlike traditional relational databases, MongoDB does not require a predefined schema, providing scalability and flexibility for handling unstructured data.
Answer: BSON (Binary JSON) is a binary representation of JSON-like documents used in MongoDB. It supports various data types, including strings, arrays, and documents, and allows efficient encoding and decoding for storage and data interchange.
Answer: In MongoDB, a collection is a group of MongoDB documents. It is equivalent to an RDBMS table and is schema-less, meaning each document in a collection can have a different structure.
Answer: MongoDB is a NoSQL database, while MySQL is a relational database. MongoDB is schema-less, offers high scalability, and is designed for handling large amounts of unstructured data, whereas MySQL follows a fixed-schema approach.
Answer: Sharding is the process of dividing a large dataset across multiple servers to distribute the load and improve performance. MongoDB uses sharding to horizontally scale databases.
Answer: ObjectId is a 12-byte identifier typically employed as the primary key in MongoDB documents. It consists of a timestamp, machine identifier, process identifier, and a random incrementing value, ensuring uniqueness.
Answer: The Aggregation Framework is a powerful feature in MongoDB that allows users to perform data transformations and manipulations on the data stored in collections. It includes a set of operators like $match, $group, and $project.
Answer: Indexing in MongoDB accelerates the data retrieval process by creating a data structure that allows the database to locate and access documents more efficiently. It significantly improves query performance.
Answer: GridFS is a specification within MongoDB for storing and retrieving large files such as images, videos, and audio files. It divides large files into smaller chunks, storing each chunk as a separate document.
Answer: The find() method is used to query documents from a MongoDB collection. It accepts a query document as a parameter and returns a cursor to the selected documents, allowing developers to retrieve and manipulate data.