1. In what language(s) is MongoDB supported?
2. The binary log of transactions used to recover the database after a crash is called the:
3. MongoDB's query language uses operators that start with which character?
4. TSV files should be expected to contain:
5. MongoDB stores documents in structures called
6. To perform a search on a collection, and obtain a cursor object for the results, use:
7. The MongoDB database is capable of:
8. Which of the following statement are true
9. What does MongoDB's Sharding provide?
10. Which of the following expressions are valid JSON documents?
11. You can write custom MapReduce functions in MongoDB using:
12. The maximum BSON document size is:
13. This replication process is
14. Which of the following would you use to query an inventory collection to get all items of type "food" with price less than $34?
15. Which of the following is syntactically correct for searching the "posts" collection for a post with the title of "Big News Story"?
16. The interactive "mongo" shell interface is based on:
17. How can you optimize document storage?
18. Which of the following terms describe MongoDB?
19. MongoDB supports UTF-8 for strings in stored objects and queries:
20. Instead of tables, MongoDB stores data in structures called:
21. When a journal file holds 1 gigabyte of data, MongoDB creates a new journal file?
22. Which platform does MongoDB support?
23. To create an index for user_name field on user collection, which of the following is the correct syntax?
24. The map-reduce operation uses a temporary collection for data processing; The benefit of this behavior is that the operations:
25. Which method should be used to create an index on a collection, if it does not already exist?
26. Which of the following statements are true about MongoDB
27. Which of the following are considered Core MongoDB operations?
28. The currently preferred replication method is called:
29. The core database operations in MongoDB are abbreviated as:
30. To atomically modify and return a single document from a collection, use:
31. Indexes in mongodb are NOT good for:
32. Which feature of mongoDB is used to balance load among multiple machines?
33. Which statement of the followings could NOT drop an index?
34. MongoDB uses GridFS to:
35. In MongoDB V2.4, what type of JavaScript engine is used to execute all JavaScript on Mongo shell ?
36. True or False? MongoDB can have foreign keys.
37. The aggregation framework is most similar to which facility from the world of relational databases
38. MongoDB's Replication can be in Master-Slave form or _______ form.
39. When Storing large files in MongoDB one is encouraged to use...
40. Which of the following atomic operations would you use to add a value to an array only if it does not already exist in the array?
41. Authentication in MongoDB is:
42. What's the difference between `save()` and `insert()` in mongo shell?
43. MongoDB can have indexes on Array Elements?
44. MongoDB uses the acronym TTL to mean:
45. Which feature of mongoDB is used for data redundancy?
46. While replication provides data redundancy, journaling is also recommended because:
47. Indexing
48. Which of the following is not a stage in the aggregation pipeline
49. An operation is said to be "idempotent" if it is proven to:
50. Which of the following binaries handles routing of sharded queries to the proper shard?
51. MongoDB document names cannot start with the characters:
52. What is the extra space allocated to document on the disk to prevent moving a document when it grows as the result of update() operations.
53. What do drivers use with protocol on the wire?
54. Due to their default behavior, Capped Collections are ideal for storing:
55. When a Capped Collection becomes full, and a new document is added:
56. "write concern" allows an application to:
57. A Priority 0 or "passive" replica member:
58. "read preference" affects how an application:
59. All writes in MongoDB Must go the primary
60. What is the easiest way to do tasks like totaling or averaging field values in MongoDB newer versions?
61. If you have a compound index on multiple fields (a,b,c), you can use it to query on:
62. What is the correct aggregation pipeline to prefix all the values of the 'name' column in the 'test' collection?
63. How many collections are created when use use gridfs to store large files
64. The equivalent for like %keyword% on mongodb find is:
65. Which of the following is the correct operation to query a document for both 'Football' and "Reading" within the interests data collected from a profile?
66. Which of the following statements are true about the MongoDB Write Consistency model
67. Which of the following is not a BSON serialization type?
68. How many data types are available in MongoDB?
69. Which datum does MongoDB use for calculating geospatial coordinates?
70. When a replica set election takes place which types of nodes can participate
71. What term is use to describe the order that a database stores documents on disk?
72. You want to minus one to field foo, what should you use?
73. In MongoDB's Geospatial Indexing, if you want to create & use index on EARTH, what is NOT TRUE?
74. You cannot use characters among /\. "*<>:|? in database names, in release version
75. A property used to address servers based on their real-world locations is called:
76. MongoDB queries return a limited size (or "threshold") of results by default, usually:
77. What is the minimum number of mongod instances that may make up a replica set?
78. Haystack Indexes are typically used to:
79. By default, MongoDB allows up to _____ collections.
80. Suppose you have a collection foo with an index created using the statement db.foo.ensureIndex({a:1, b:-1, c:1}). Which of the following queries could use the index
81. Asume a users collections with the following fields: "_id", "username", "password", "email". At least one of the users has registered all of the fields. If you run both this queries: 1) db.users.find({}, {password: false, email: false}); 2) db.users.find({}, {_id: false, username: true}) Would the output be the same?
82. What is command specifying for database path ?
83.
Describe the output of the following mongo shell JavaScript: Object.keys(db.collection.findOne())
84.
Choose the best description for the query below db.foo.find({ $text:{ $search:
85. In a sharded replicas set environment with multiple mongos servers, which would decide the mongos failover?
86. What do you mean by sharding?
87. Choose the best commands to clone a collection to a sharded cluster from a developer machine.
88. Which is true about sharding?
89. _____ interface with client applications and direct operations to the appropriate shard or shards.
90. A query fails to return a complete result set on a sharded cluster. Choose the most probable reason
91. Which component exist in sharded cluster?
92. Regarding MongoDB sharding, choose the incorrect statement:
93. Which describe best the concept of Sharding in MongoDB ?
94. Why Sharding?
95. Why is sharding necessary?
96. Regarding MongoDB sharding, choose the correct statement:
97.
What is the difference between Sharding and Replication ?
98. Which operation will write the resulting documents of the aggregation pipeline to a collection in MongoDB?
99. Query shape consists of a combination of query, sort, and _____ specifications.
100.
In MongoDB, write operations are atomic at the (...........) level.
101. Which command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition to the next pipeline stage?
102. Which is the most suitable advantage of using embedded documents?
103. Correct syntax for creating an index?
104. What is Profiler?
105. Which collections are used by MongoDB to store GridFS data?
106. Which is correct for _id in MongoDB?
107. Which method can be used in MongoDB for relating documents?
108. Which is a primary key in MongoDB?
109. What is the default size of GridFS chunk?
110. Which is correct about Capped Collections?
111. Point out the wrong statement :
112. Which is atomic operations in MongoDB?
113. What kind of NoSQL database MongoDB is?
114. Which command will find all the posts that have been tagged as tutorial?
115. Regarding data modeling in MongoDB, which of the following is correct ?
116. Choose the best description of the output for the query below var weekAgo = Date.now() - (1000*60*60*24*7); db.visits_calc.group( { key:{date:true}, cond:{date:{$gt:weekAgo}}, reduce:function(obj, out) {out.day += obj.total}, initial:{day:0} });
117. What will be the output of two command in MongoDB: db.mycol.insert({'_id':1}) db.mycol.insert({'_id':1})
118. Which expression can not be used with aggregation?
119. Best statement that describes: 'why aggregation queries outperform mapreduce for small datasets'.
120. What is the maximum number of Indexes per collection allowed?
121. What is the maximum size of an Index key?
122. Regarding storage in MongoDB, which is incorrect?
123. Regarding aggregation pipeline optimization concepts in MongoDB, if you have a $sort followed by a $match:
124. What is a covered query?
125. In MongoDB, a query ____ consists of a combination of query, sort, and projection specifications.
126. Regarding indexing and performance in MongoDB, choose the correct statement :
127. Best describes the concept of Replication in MongoDB ?
128. Which aggregation option is used to specify the fields that need to be passed to the next stage of the aggregation pipeline?
129. Best describes the concept of Aggregations in MongoDB ?
130. Consider the following posts collection in MongoDB, { '_id' : 1, 'post_title' : 'this is post title', 'tags': [ 'social', 'friends', 'books'], // rest of the document } Output of following query: db.posts.aggregate( [ { $unwind : '$tags' } ] )
131. Sometimes the failover process may require a ____ during operation.
132. Which operator is related to geography of data ?
133. ___ filters the document stream to allow only matching documents to pass unmodified into the next pipeline stage.
134. Choose the best description of why MongoDB performs well on a non heterogeneous cluster:
135. Which operation on a single document will operate atomically?
136. Which SQL terminilogy is same as $match in MongoDB?
137. Which command can be used to check the size of a collection named user?
138. Which command can be used to check the size of a collection named user?
139. Which method in MongoDB replaces the existing document with the new document passed as parameter?
140. Consider the following document from the products collection: { _id: 1, product_code: '1234', variations: [ { size: 'L', price: 1000 }, { size: 'M', price: 800 } ] } What does the following query using $elemMatch return? db.products.find( { product_code: '1234' }, { variations: { $elemMatch: { size: 'L' } } } )
141. If you are using { upsert: true } option in your update command, which parameter will be used to determine if any new documents were inserted:
142. Which operation add a new document to the users collection ?
143. The query below returns a collection of users with a projection db.users.find({}, {name: 1, _id : 1}) Choose the best statement that describes how to extract a collection of users with the projection that shows the creation date
144. Which is a correct command to insert a document in a database called album and collection called songs?
145. Which is captured by the Database Profiler in MongoDB ?
146. For a collection that represents type A { 'field1' : 'val1', 'field2' : 'val2' } Choose the best way to optimize the collection for updates if field2 is an Enumeration.
147. For a mongo mapreduce flow, the emit function has the form emit(this.cId, {q1:this.Q1, q2s:this.Q2}); Choose the correct return value for the reduce function
148. Which field DBRefs has?
149. Which point describe when using embedded data models?
150. If the address data is frequently retrieved with the name information,how will you modify the following schema representing one to one relationship with referencing ? { _id: 'joe', name: 'Joe Bookreader' } { patron_id: 'joe', street: '123 Fake Street', city: 'Faketon', state: 'MA', zip: '12345' }
151. When should one should avoid embedding one document within another in MongoDB?
152. Point out the correct statement.
153. Which is a valid MongoDB document?
154. Choose the statement that best describes the query below: db.myCol.find().sort({_id:1});
155. Suppose we have a collection of users with different ages. Which call will find the oldest person with the name John?
156. Describe the best use case for choosing MongoDB map-reduce.
157. What is the minimum nodes required for replica?
158. Which is correct index types?
159. Given the below statement, please choose the most probable reason:- 'You have a web application with mongodb as a backend. A query returns a resultset, however when called a second time the result set is empty.'
160. Choose the type of query where indexes can result in slower query response time.
161. For the query below db.collection.find( { x: 5 } ).sort( { z: 1} ) Choose the best index to support the query
162. how indexing improve query response time
163. Which method will shut down replica set?
164. How many members a replica set can have?
165. Which is the correct order in pipelining in mongo aggregation?
166. For the mongo shell function below function last(N) { return db.collection.find().skip(db.collection.count() - N); }
167. Why use replication?
168. Choose the statement that best describes the query below: db.myCol.find().sort({$natural:-1}).limit(50);
169. In a shared replica set environment, w defined the level and kind of write concern. Which value of w specifies ti return success only after a majority of voting members have acknowledge?
170. For a large data set in terms of size on the volume your MongoDB is exhibiting poor write performance. Choose the most probable reason
171. Under what conditions is it required to use the db.getCollection() method in the mongo shell to delete a collection?
172. Choose the best description of the query below:- db.users.find ({ 'name' : /m/i } ).pretty()
173. Which is true? Check all that apply.
174. Which is stage of aggregation?
175. Which option exist in ensureIndex method?
176. Which is the correct calling of creating an index?
177. Which parameter affect ObjectId?
178. Which call will remove all users who are older than 21 from Users collection?
179. 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:
180. 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:
181. 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?
182. What can be done to optimize aggregation pipeline?
183. Which is the correct call to setup replica set?
184. Which is true about replica set? (choose all that apply)
185. Your rs.add('....') is missing the quotation marks
186. Which method allow to insert documents into a collection?
187. Most suitable advantage of using embedded documents?
188. Regarding Pipeline Operators in MongoDB, which is an incorrect statement? (choose all that apply)
189. Best describes the query below? db.col1.findAndModify({ query: {'name': 'val1'}, update: { $inc: { 'subObj.field1': 1 } });
190. 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.
191. MongoDB is a process collection of documents using (...) operations
192. Which calls will set a 1 second limit for processing operations?
193. Which help analyze a query?
194. Which command will return all the posts with a number of likes greater than 100 and less than 200, including the limit values ?
195. Which statement is valid?
196. How can you create index on a particular key in MongoDB?
197. Which is not an aggregation operation? (choose all that apply)
198. The following statement is most suitable for aggregation stage: 'Used to select fields from the collection while aggregation'.
199. Which statement best describes $allElementsTrue?
200. All the replica set members contain a copy of the oplog in the _____ collection.
201. Which could be a use case where MongoDB is a good fit?
202. If you created a compound index on (X, Y, Z), which access pattern will not be able to utilize the index?
203. Which cursor methods is used to select a particular index?
204. If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which option is correct?
205. How many chunks can there be if the shard key cardinality is 4?
206. When is sharding needed? (choose all that apply)
207. When should you avoid embedding one document within another in MongoDB?
208. Which MongoDB shell command should you use to back up a database?
209. Which shell query displays all citizens with an age greater than or equal to 21?
210. What does a MongoDB collection consist of?
211. Given an ObjectId in _id, how do you get the time it was created?
212. Given a cursor named myCursor, which command returns a boolean value?
213. Which command returns a specific document in the user's collection?
214. To import a JSON array into Mongo, what flags are needed with MongoDBimport?
215. Choose the shell command that connects to a MongoDB database.
216. In the MongoDB shell, how can you tell if an index was used with a query?
217. Suppose your aggregation pipeline terminated with an exception referring to exceeded memory limit. What is the best way to resolve the issue?
218. What is the recommended way to delete a user?
219. What the primary database in a replica set fails, when does failover begin?
220. What is the correct option to set up Kerberos when starting MongoDBd?
221. What is the purpose of an arbiter in a replica set?
222. To restrict the number of records coming back from a query, which command should you use?
223. Which query bypasses the first 5 customers and returns the next 10?
224. How do you create a text index?
225. 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?
226. 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?
227. A compound index allows you to _ ?
228. Why are ad-hoc queries useful?
229. How often do the members of a replica set send heartbeats to each other?
230. Which command returns all of the documents in the customers collection?
231. Given a cursor named myCursor, pointing to the customers collection, how to you get basic info about it?
232. What is true about indexes?
233. What is the preferred format to store geospatial data in MongoDB?
234. Which programming language is used to write MongoDB queries? (Alternative: In the MongoDB shell, what programming language is used to make queries?)
235. You have two text fields in your document and you'd like both to be quickly searchable. What should you do?
236. To import a CSV file into MongoDB, which command should you issue?
237. . In an MongoDB mapReduce command, the reduce function should _.
238. On a newly created collection, which field will have an index?
239. 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?
240. You want to modify an existing index. What is the best way to do this?
241. From the MongoDB shell, how do you create a new document in the customers collection?
242. Which field is required of all MongoDB documents?
243. A MongoDB instance has at least what three files?
244. You'd like a set of documents to be returned in last name, ascending order. Which query will accomplish this?
245. What is NOT a standard role in MongoDB?
246. Which MongoDB shell command deletes a single document?
247. Using the MongoDB shell, how do you remove the customer collection and its indexes?
248. By default, applications direct their read operations to which member of the replica set?
249. You need to get the names of all the indexes on your current collection. What is the best way to accomplish this?
250. 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?
251. To cleanly shut down MongoDB, what command should you use from the MongoDB shell?
252. When no parameters are passed to explain(), what mode does it run in?
253. What is the correct query to find all of the people who have a home phone number defined?
254. Which file in the MongoDB directly holds the MongoDB daemon?
255. You have just secured your previously unsecured MongoDB server, but the server is still not requiring authentication. What is the best option?
256. What is the most accurate statement regarding MongoDB and ad hoc queries?
257. In MongoDB, what does a projection do?
258. To remove a database and all of its records from MongoDB, what operator should you use?
259. What option can be passed to start the MongoDB shell without connecting to a database?
260. How can you improve the appearance of the output JSON that contains the _id?
261. What happens to a Replica set oplog if it runs out of memory?
262. MongoDB ships with a variety of files. Which file runs the MongoDB shell?
263. From the MongoDB shell, how do you execute a JavaScript file named list.js?
264. Which MongoDB shell query will sort the customer's collection by name descending?
265. 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?
266. You have a collection with millions of documents. Each time you attempt to sort. MongoDB runs out of memory. What might help?
267. You need to be able to quickly find a word in a text field. What should you do?
268. Which field is always included in a projection unless specifically excluded?
269. After installing MongoDB on your machine, what must you do before launching Mongo?
270. How does a --jsonArray file need to be structured?
271. How do you create a new MongoDB user?
272. What is the internal data structure of a MongoDB document?
273. Which projection shows only the FirstName and lastName fields of a document in the customers collection?
274. Documents in mongodb are atomic at the ___ level
275. What should the priority of a member be in order to prevent it from becoming the primary in replica set?
276. 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?
277. When using aggregation $convert. which is not a parameter?
278. All tag values in tag sets must be _.