MongoDB offers several advanced features that cater to specific use cases and enhance its capabilities as a NoSQL database. These features include Change Streams (for real-time data changes), Transactions (for multi-document ACID compliance), Time-series Collections (for efficient time-series data storage), and GridFS (for storing and retrieving large files).
The following MCQs will help you prepare for such interviews by testing your knowledge of MongoDB’s advanced features.
1.) What are Change Streams in MongoDB?
A) A feature for compressing data
B) A feature for backing up data
C) A feature for encrypting data
D) A feature for real-time monitoring of data changes
2.) Which of the following is true about MongoDB Transactions?
A) They are only supported in single-document operations
B) They provide multi-document ACID compliance
C) They are not supported in MongoDB
D) They are used for compressing data
3.) What is the purpose of Time-series Collections in MongoDB?
A) To store and query time-series data efficiently
B) To compress data
C) To encrypt data
D) To back up data
4.) What is GridFS in MongoDB?
A) A feature for compressing data
B) A feature for storing and retrieving large files
C) A feature for encrypting data
D) A feature for backing up data
5.) Which command is used to create a Change Stream in MongoDB?
A) db.collection.listen()
B) db.collection.stream()
C) db.collection.monitor()
D) db.collection.watch()
6.) Which of the following is true about MongoDB Transactions?
A) They are supported only in standalone MongoDB instances
B) They require a replica set or sharded cluster
C) They are not supported in MongoDB
D) They are used for compressing data
7.) What is the purpose of the startTransaction() command in MongoDB?
A) To encrypt data
B) To compress data
C) To start a multi-document transaction
D) To back up data
8.) Which of the following is true about Time-series Collections?
A) They store data in a compressed format
B) They are optimized for time-series data
C) They are not supported in MongoDB
D) They are used for encrypting data
9.) Which of the following is true about Time-series Collections?
A) They support efficient queries on time-based data
B) They are not optimized for time-series data
C) They are used for encrypting data
D) They are used for compressing data
10.) Which of the following is true about GridFS?
A) It splits large files into smaller chunks
B) It compresses large files
C) It encrypts large files
D) It backs up large files
Related