Adblocker Detected
Quizack provides Online Quiz and Practice MCQs for Free. Please disable your Ad-Blocker so we can earn from ads and keep this project alive.
1. All tag values in tag sets must be _.
2. When using aggregation $convert. which is not a parameter?
3. You need to add an index to the large name collection in your production database. You do not want to have disruption of service for your users and you can't afford to have a team to do the work during after hours. What should you do?
4. What should the priority of a member be in order to prevent it from becoming the primary in replica set?
5. Documents in mongodb are atomic at the ___ level
6. Which projection shows only the FirstName and lastName fields of a document in the customers collection?
7. What is the internal data structure of a MongoDB document?
8. How do you create a new MongoDB user?
9. How does a --jsonArray file need to be structured?
10. After installing MongoDB on your machine, what must you do before launching Mongo?
11. Which field is always included in a projection unless specifically excluded?
12. You need to be able to quickly find a word in a text field. What should you do?
13. You have a collection with millions of documents. Each time you attempt to sort. MongoDB runs out of memory. What might help?
14. Suppose you are using the mongoimport command to import personnel data and there is a unique index on the email field. What happens when there are duplicate emails in the import?
15. Which MongoDB shell query will sort the customer's collection by name descending?
16. From the MongoDB shell, how do you execute a JavaScript file named list.js?
17. MongoDB ships with a variety of files. Which file runs the MongoDB shell?
18. What happens to a Replica set oplog if it runs out of memory?
19. How can you improve the appearance of the output JSON that contains the _id?
20. What option can be passed to start the MongoDB shell without connecting to a database?
21. To remove a database and all of its records from MongoDB, what operator should you use?
22. In MongoDB, what does a projection do?
23. What is the most accurate statement regarding MongoDB and ad hoc queries?
24. You have just secured your previously unsecured MongoDB server, but the server is still not requiring authentication. What is the best option?
25. Which file in the MongoDB directly holds the MongoDB daemon?
26. What is the correct query to find all of the people who have a home phone number defined?
27. When no parameters are passed to explain(), what mode does it run in?
28. To cleanly shut down MongoDB, what command should you use from the MongoDB shell?
29. You are going to do a series of updates to multiple records. You find setting the multi option of the update() command too tiresome. What should you do instead?
30. You need to get the names of all the indexes on your current collection. What is the best way to accomplish this?
31. By default, applications direct their read operations to which member of the replica set?
32. Using the MongoDB shell, how do you remove the customer collection and its indexes?
33. Which MongoDB shell command deletes a single document?
34. What is NOT a standard role in MongoDB?
35. You'd like a set of documents to be returned in last name, ascending order. Which query will accomplish this?
36. A MongoDB instance has at least what three files?
37. Which field is required of all MongoDB documents?
38. From the MongoDB shell, how do you create a new document in the customers collection?
39. You want to modify an existing index. What is the best way to do this?
40. You have a collection of thousands of students. You'd like to return the second set of 20 documents from the sorted collection. What is the proper order in which to apply the operations?
41. On a newly created collection, which field will have an index?
42. . In an MongoDB mapReduce command, the reduce function should _.
43. To import a CSV file into MongoDB, which command should you issue?
44. You have two text fields in your document and you'd like both to be quickly searchable. What should you do?
45. Which programming language is used to write MongoDB queries? (Alternative: In the MongoDB shell, what programming language is used to make queries?)
46. What is the preferred format to store geospatial data in MongoDB?
47. What is true about indexes?
48. Given a cursor named myCursor, pointing to the customers collection, how to you get basic info about it?
49. Which command returns all of the documents in the customers collection?
50. How often do the members of a replica set send heartbeats to each other?
51. Why are ad-hoc queries useful?
52. A compound index allows you to _ ?
53. One of the documents in your collection has an _id based upon an older database design and you want to change it. You write an update command to find the document and replace the _id but the _id isn't changed. How should you fix the issue?
54. Assuming you have customers collection with a firstName and lastName field, which is the correct MongoDB shell command to create an index on lastName, then firstName both ascending?
55. How do you create a text index?
56. Which query bypasses the first 5 customers and returns the next 10?
57. To restrict the number of records coming back from a query, which command should you use?
58. What is the purpose of an arbiter in a replica set?
59. What is the correct option to set up Kerberos when starting MongoDBd?
60. What the primary database in a replica set fails, when does failover begin?
61. What is the recommended way to delete a user?
62. Suppose your aggregation pipeline terminated with an exception referring to exceeded memory limit. What is the best way to resolve the issue?
63. In the MongoDB shell, how can you tell if an index was used with a query?
64. Choose the shell command that connects to a MongoDB database.
65. To import a JSON array into Mongo, what flags are needed with MongoDBimport?
66. Which command returns a specific document in the user's collection?
67. Given a cursor named myCursor, which command returns a boolean value?
68. Given an ObjectId in _id, how do you get the time it was created?
69. What does a MongoDB collection consist of?
70. Which shell query displays all citizens with an age greater than or equal to 21?
71. Which MongoDB shell command should you use to back up a database?
72. When should you avoid embedding one document within another in MongoDB?
73. When is sharding needed? (choose all that apply)
74. How many chunks can there be if the shard key cardinality is 4?
75. If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which option is correct?
76. Which cursor methods is used to select a particular index?
77. If you created a compound index on (X, Y, Z), which access pattern will not be able to utilize the index?
78. Which could be a use case where MongoDB is a good fit?
79. All the replica set members contain a copy of the oplog in the _____ collection.
80. Which statement best describes $allElementsTrue?
81. The following statement is most suitable for aggregation stage: 'Used to select fields from the collection while aggregation'.
82. Which is not an aggregation operation? (choose all that apply)
83. How can you create index on a particular key in MongoDB?
84. Which statement is valid?
85. Which command will return all the posts with a number of likes greater than 100 and less than 200, including the limit values ?
86. Which help analyze a query?
87. Which calls will set a 1 second limit for processing operations?
88. MongoDB is a process collection of documents using (...) operations
89. The code below is used to try to delete a collection in the mongo shell: db.my-collection.drop() Choose the best statement that best describes why the code fails to delete the collection.
90. Best describes the query below? db.col1.findAndModify({ query: {'name': 'val1'}, update: { $inc: { 'subObj.field1': 1 } });
91. Regarding Pipeline Operators in MongoDB, which is an incorrect statement? (choose all that apply)
92. Most suitable advantage of using embedded documents?
93. Which method allow to insert documents into a collection?
94. Your rs.add('....') is missing the quotation marks
95. Which is true about replica set? (choose all that apply)
96. Which is the correct call to setup replica set?
97. What can be done to optimize aggregation pipeline?
98. Which of the read preference modes in a replica set configuration specify the operations to be read from the node whose network latency falls within the acceptable latency window?
99. You are setting up replication for a mongodb cluster and you get the following error 'no replset config has been received'. Choose the most probable reason:
100. You have a 10G primary partition with your data in in ' /var/lib/mongodb/'. Choose the best option to transfer data to a larger partition:
Networking
OOPS Concepts
Objective C
OpenGL
Oracle Database
PayPal-Development
Related MCQ's