Question:- What is Storage Encryption?
Answer:- Storage encryption encrypts all MongoDB data on storage or on the operating system to ensure that only authorized processes can access the protected data.
Question:- Which method is used to create an index?
Answer:- The createIndex() method is used to create an index.
Question:- What is Replica set oplog?
Answer:- The oplog records all operations that modify the data in the replica set.
Question:- What is Vertical Scaling?
Answer:- Vertical scaling adds more CPU and storage resources to increase capacity.
Question:- Define Horizontal Scaling.
Answer:- Horizontal scaling divides the dataset and distributes data over multiple servers, or shards.
Question:- What are the components of the Sharded cluster?
Answer:- The sharded cluster has the following components: • Shards • Query routers • Config servers
Question:- Which command is used to create a database?
Answer:- To create a database, we can use the Database_Name command.
Question:- Which command is used to drop a database?
Answer:- The db.dropDatabse() command is used to drop a database.
Question:- What is the use of the pretty() method?
Answer:- The pretty() method is used to show the results in a formatted way.
Question:- Which method is used to remove a document from a collection?
Answer:- The remove() method is used to remove a document from a collection.
Question:- Define MongoDB Projection.
Answer:- Projection is used to select only the necessary data. It does not select the whole data of a document.
Question:- What is the use of the limit() method?
Answer:- The limit() method is used to limit the records in the database.
Question:- What is the syntax of the limit() method?
Answer:- The syntax of the limit() method is as follows: >db.COLLECTION_NAME.find().limit(NUMBER)
Question:- What is the syntax of the sort() method?
Answer:- In MongoDB, the following syntax is used for sorting documents: >db.COLLECTION_NAME.find().sort({KEY:1})
