InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What are some utilities for backup and restore in MongoDB? |
|
Answer» The mongo shell does not include FUNCTIONS for exporting, importing, backup, or RESTORE. HOWEVER, MongoDB has created methods for accomplishing this, so that no scripting work or complex GUIs are needed. For this, several utility scripts are provided that can be used to get data in or out of the database in BULK. These utility scripts are:
|
|
| 2. |
Explain the Replication Architecture in MongoDB. |
|
Answer» The following diagram depicts the ARCHITECTURE diagram of a simple replica set cluster with only three server nodes – one PRIMARY node and two SECONDARY nodes:
|
|
| 3. |
What is a Replica Set in MongoDB? |
|
Answer» To keep identical copies of your data on multiple servers, we use REPLICATION. It is RECOMMENDED for all production deployments. Use replication to keep your application running and your data safe, even if something happens to one or more of your servers. Such replication can be created by a REPLICA set with MongoDB. A replica set is a GROUP of servers with one primary, the server taking writes, and multiple secondaries, servers that keep copies of the primary’s data. If the primary crashes, the secondaries can elect a new primary from amongst themselves. |
|
| 4. |
Explain the concept of pipeline in the MongoDB aggregation framework. |
|
Answer» An individual stage of an AGGREGATION pipeline is a data processing UNIT. It TAKES in a stream of input DOCUMENTS one at a time, processes each document one at a time, and produces an output stream of documents one at a time (see figure below). |
|
| 5. |
What is the Aggregation Framework in MongoDB? |
Answer»
|
|
| 6. |
What are MongoDB Charts? |
|
Answer» MongoDB CHARTS is a new, integrated tool in MongoDB for DATA visualization.
|
|
| 7. |
What do you mean by Transactions? |
|
Answer» A transaction is a logical unit of processing in a database that includes one or more database operations, which can be read or write operations. Transactions PROVIDE a useful feature in MongoDB to ensure consistency.
|
|