Question:- Define Namespace in MongoDB.
Answer:- It is the concatenation of the collection name and the name of the database.
Question:- Which syntax is used to create a Collection in MongoDB?
Answer:- We can create a collection in MongoDB using the following syntax: db.createCollection(name,options)
Question:- Which syntax is used to drop a Collection in MongoDB?
Answer:- We can use the following syntax to drop a collection in MongoDB: db.collection.drop()
Question:- Explain Replication.
Answer:- Replication is the process of synchronizing data across multiple servers.
Question:- What is the use of an Index in MongoDB?
Answer:- In MongoDB, indexes provide high-performance read operations for frequently used queries.
Question:- Which command is used for inserting a document in MongoDB?
Answer:- The following command is used for inserting a document in MongoDB: database.collection.insert (document)
Question:- What is the use of GridFS in MongoDB?
Answer:- GridFS is used for storing and retrieving large files, such as audio, image, and video files.
Question:- What is the use of Journaling in MongoDB?
Answer:- Journaling is used for safe backups in MongoDB.
Question:- Which command is used to see a connection?
Answer:- We can use the following command to see the connection: db_adminCommand (“connPoolStats”)
Question:- Define the primary Replica set.
Answer:- The primary replica set accepts all write operations from clients.
Question:- Define the secondary Replica sets.
Answer:- The secondaries replicate the primary replica set’s oplog and apply the operations to their datasets such that the secondaries’ datasets reflect the primary’s dataset.
Question:- What is the use of Profiler?
Answer:- Profiler is used to show the performance characteristics of every operation against the database.
Question:- What type of data is stored by MongoDB?
Answer:- MongoDB stores data in the form of documents, which are JSON-like field and value pairs.
Question:- What is the purpose of Replication?
Answer:- Replication provides redundancy, and it increases data availability.
