

InterviewSolution
Saved Bookmarks
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.
201. |
Point out the correct statement.(a) Applications that handle monetary data often require capturing fractional units of currency(b) Applications that handle time data often require capturing fractional units of currency(c) Applications that handle temporal and spatial data often require capturing fractional units of currency(d) All of the mentioned |
Answer» The correct option is (a) Applications that handle monetary data often require capturing fractional units of currency Easy explanation: Some fractional numeric quantities, such as one third and one tenth, have no exact representation in binary floating point numbers. |
|
202. |
Point out the wrong statement.(a) Secondary indices are not available in MongoDB(b) MongoDB supports search by field, range queries, regular expression searches(c) MongoDB can store the business subject in the minimal number of documents(d) All of the mentioned |
Answer» The correct option is (a) Secondary indices are not available in MongoDB Easy explanation: Any field in a MongoDB document can be indexed. |
|
203. |
Point out the wrong statement.(a) MongoHub is a native OS-X-application for MongoDB management(b) Cassandra is most popular for its document stores management system(c) MongoDB is the fourth most popular type of database management system(d) All of the mentioned |
Answer» The correct option is (b) Cassandra is most popular for its document stores management system Explanation: MongoDB is most popular for document stores. |
|
204. |
Initial release of MongoDB was in the year?(a) 2000(b) 2005(c) 2009(d) 2011 |
Answer» Right option is (c) 2009 Explanation: MongoDB is developed by the software company 10gen in October 2007 as a component of a planned platform as a service product. |
|
205. |
__________ precision multiplies the monetary value by a power of 10.(a) Exact(b) Accurate(c) Ambiguity(d) None of the mentioned |
Answer» The correct option is (a) Exact Best explanation: MongoDB stores numeric data as either IEEE 754 standard 64-bit floating point numbers or as 32-bit or 64-bit signed integers. |
|
206. |
Point out the wrong statement.(a) Indexes cannot enforce uniqueness in collection(b) CRUD stands for create, read, update, and delete(c) CRUD application is the most simplest application(d) All of the mentioned |
Answer» The correct answer is (a) Indexes cannot enforce uniqueness in collection For explanation: Indexes may also enforce uniqueness, store objects in a geospatial representation, and facilitate text search. |
|
207. |
Which of the following is related to the parsing of document for root?(a) Stemming(b) Synonyms(c) Ranking(d) None of the mentioned |
Answer» The correct answer is (a) Stemming Best explanation: Keyword queries in MongoDB can not parse keywords for root or related words. |
|
208. |
Point out the correct statement.(a) Humon.io is a Web based GUI for MongoDB(b) Mongo3 is a java-based GUI(c) NoSQL Manager for MongoDB is an MS Windows GUI application for MongoDB management with Shell(d) All of the mentioned |
Answer» The correct option is (c) NoSQL Manager for MongoDB is an MS Windows GUI application for MongoDB management with Shell For explanation I would say: NoSQL Manager for MongoDB is similar to MMS. |
|
209. |
Point out the correct statement.(a) Secondary indexes allow applications to store a view of a portion of the collection in an efficient data structure(b) MongoDB has full support for secondary indexes(c) Most indexes store an ordered representation of all values of a field or a group of fields(d) All of the mentioned |
Answer» Right choice is (b) MongoDB has full support for secondary indexes To elaborate: Secondary indexes are used to enhance the performance of common queries and updates. |
|
210. |
In MongoDB _________ operations modify the data of a single collection.(a) CRUD(b) GRID(c) READ(d) All of the mentioned |
Answer» The correct option is (a) CRUD Explanation: Data modification refers to operations that create, update, or delete data. |
|
211. |
MongoDB has been adopted as ________ software by a number of major websites and services.(a) frontend(b) backend(c) proprietary(d) all of the mentioned |
Answer» Right option is (b) backend To explain I would say: MongoDB is the most popular NoSQL database system. |
|
212. |
The order of documents returned by a query is not defined unless you specify a ______(a) sortfind()(b) sortelse()(c) sort()(d) none of the mentioned |
Answer» Right option is (c) sort() The explanation: You can modify the query to impose limits, skips, and sort orders. |
|
213. |
Which of the following is related to document that provide support for synonym or related queries in the application layer?(a) Stemming(b) Synonyms(c) Ranking(d) None of the mentioned |
Answer» Right option is (b) Synonyms The best I can explain: MongoDB can support keyword searches using specific data models and multi-key indexes. |
|
214. |
Point out the wrong statement.(a) The “hard” ulimit refers to the maximum number of processes that a user can have active at any time(b) The “soft” ulimit refers to the minimum number of processes that a user can have active at any time(c) ulimit will modify both “hard” and “soft” values unless the -H or -S modifiers are specified when modifying limit values(d) None of the mentioned |
Answer» Correct answer is (b) The “soft” ulimit refers to the minimum number of processes that a user can have active at any time To elaborate: There are both “hard” and the “soft” ulimits that affect MongoDB’s performance. |
|
215. |
MongoDB stores all documents in _____________(a) tables(b) collections(c) rows(d) all of the mentioned |
Answer» Right choice is (b) collections To explain I would say: Collections are analogous to a table in relational databases. |
|
216. |
Administrative information in MongoDB can also be accessed through _____________(a) dashboard(b) web interface(c) psql shell(d) all of the mentioned |
Answer» Correct answer is (b) web interface The best I can explain: Web interface is a simple webpage that serves information about the current server status. By default, this interface is 1000 ports above the database port (28017). |
|
217. |
Point out the correct statement.(a) Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients(b) Write operations, or queries, retrieve data stored in the database(c) The selection limits the amount of data that MongoDB returns to the client over the network(d) All of the mentioned |
Answer» The correct choice is (a) Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients For explanation: In MongoDB, queries select documents from a single collection. |
|
218. |
Which of the following is web-based client software for MongoDB?(a) BI Studio(b) Database Master(c) Fang of Mongo(d) Mongo3 |
Answer» The correct choice is (b) Database Master Best explanation: Futon4Mongo is a clone of the CouchDB-Futon-Web-Interface for MongoDB. |
|
219. |
Point out the wrong statement.(a) sort() modifier sorts the results by age in ascending order(b) Queries in MongoDB return all fields in all matching documents by default(c) To scale the amount of data that MongoDB sends to applications, include a projection in the queries.(d) None of the mentioned |
Answer» Right choice is (c) To scale the amount of data that MongoDB sends to applications, include a projection in the queries. For explanation: By projecting results with a subset of fields, applications reduce their network overhead and processing requirements. |
|
220. |
Which of the following is related to document that do not provide a way to weight results?(a) Stemming(b) Synonyms(c) Ranking(d) None of the mentioned |
Answer» The correct option is (c) Ranking Best explanation: The keyword look ups described in this document do not provide a way to weight results. |
|
221. |
Which of the following functionality is used for aggregation framework?(a) $match(b) $project(c) $projectmatch(d) All of the mentioned |
Answer» Right answer is (b) $project Best explanation: For related projection functionality in the aggregation framework pipeline, use the $project pipeline stage. |
|
222. |
Which of the following is the second argument to projection?(a) findOne()(b) findOne1()(c) selectOne()(d) find() |
Answer» Right choice is (d) find() Explanation: Projections are the second argument to the find() method, which specifies a list of fields to return or list fields to exclude in the result documents. |
|
223. |
An application communicates with MongoDB by way of a client library, called _____________(a) Driver(b) Parent(c) Rank(d) None of the mentioned |
Answer» Correct choice is (a) Driver The best explanation: Driver handles all interaction with the database in a language appropriate to the application. |
|
224. |
________ indexes can include any field whose value is a string or an array of string elements.(a) text(b) string(c) char(d) none of the mentioned |
Answer» The correct option is (a) text The explanation: MongoDB provides text indexes to support text search of string content in documents of a collection. |
|
225. |
User-defined indexes on multiple fields is called ___________(a) composite index(b) secondary index(c) compound index(d) none of the mentioned |
Answer» Right answer is (c) compound index Explanation: The order of fields listed in a compound index has significance. |
|
226. |
Point out the correct statement.(a) An array with a large number of elements will incur greater indexing costs on insertion(b) An array with a large number of elements will incur smaller indexing costs on updates(c) An array with a small number of elements will incur greater indexing costs on insertion(d) None of the mentioned |
Answer» Correct answer is (a) An array with a large number of elements will incur greater indexing costs on insertion The best I can explain: An array with a large number of elements, such as one with several hundred or thousands of keywords will incur greater indexing costs on insertion. |
|
227. |
Which of the following query selects documents in the records collection that match the condition { “user_id”: { $lt: 42 } }?(a) db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 0 } )(b) db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } )(c) db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 1 } )(d) db.records.select( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
Answer» Right answer is (b) db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) To elaborate: Query uses the projection { “history”: 0 } to exclude the history field from the documents in the result set. |
|
228. |
Point out the correct statement.(a) With MongoDB, you cannot embed related data in a single structure or document(b) The key consideration for the structure of your documents is the decision to embed or to use references(c) Reference schema is generally known as “denormalized” models(d) None of the mentioned |
Answer» Correct answer is (b) The key consideration for the structure of your documents is the decision to embed or to use references To elaborate: Effective data models support your application needs. |
|
229. |
Which of the following parameter specifies the verbosity mode for the explain output?(a) verbosity(b) verbose(c) queryPlanner(d) none of the mentioned |
Answer» Correct answer is (b) verbose To explain I would say: The mode affects the behavior of explain() and determines the amount of information to return. |
|
230. |
Read preference modes are also available to clients connecting to a sharded cluster through ______________(a) MMS(b) mongos(c) mongod(d) none of the mentioned |
Answer» The correct answer is (b) mongos The best explanation: The mongos instance obeys specified read preferences when connecting to the replica set that provides each shard in the cluster. |
|
231. |
Embedded data model is used when you have _________ relationships between entities.(a) contains(b) isa(c) inheritance(d) all of the mentioned |
Answer» Right option is (a) contains The explanation is: Embedding provides better performance for read operations. |
|
232. |
___________ bulk indexes may be more efficient for some kinds of content and workloads in real time.(a) Synchronous(b) Asynchronous(c) Unique(d) None of the mentioned |
Answer» Correct answer is (b) Asynchronous To elaborate: MongoDB can support keyword searches using specific data models and multi-key indexes; |
|
233. |
If the query planner selects a collection scan, the explain result includes a _________ stage.(a) COLLSCAN(b) TABLESCAN(c) ROWSCAN(d) All of the mentioned |
Answer» The correct answer is (a) COLLSCAN Explanation: The format and fields of the explain results have changed from previous versions. |
|
234. |
All read preference modes except _______ may return stale data.(a) primary(b) primaryPreferred(c) secondary(d) none of the mentioned |
Answer» Correct answer is (a) primary Explanation: Ensure that your application can tolerate stale data if you choose to use a non-primary mode. |
|
235. |
Point out the wrong statement.(a) If MongoDB can use an index scan to obtain the requested sort order, the result will not include a SORT stage(b) In previous versions of MongoDB, cursor.explain() returned the scanAndOrder field to specify whether MongoDB could use the index order to return sorted results(c) If MongoDB uses indexes for a $and expression, the result will include the AND stage with an inputStages array that details the replicata sets(d) None of the mentioned |
Answer» Right choice is (a) If MongoDB can use an index scan to obtain the requested sort order, the result will not include a SORT stage Easiest explanation: If MongoDB uses indexes for a $or expression, the result will include the OR stage with an inputStages array that details the indexes |
|
236. |
For sharded collections, explain returns the __________ for each accessed shard.(a) clientInfo(b) serverInfo(c) serverplan(d) all of the mentioned |
Answer» Correct choice is (b) serverInfo To elaborate: For sharded collections, explain returns the core query planner and server information for each accessed shard in the shards field |
|
237. |
Which of the following collections work in a way similar to circular buffers?(a) Capped(b) Secondary(c) Sharded(d) All of the mentioned |
Answer» Correct answer is (a) Capped The best explanation: Once a collection fills its allocated space, it makes room for new documents by overwriting the oldest documents in the collection. |
|
238. |
The __________ feature of collections expires documents after a period of time.(a) TEL(b) TTL(c) TPL(d) None of the mentioned |
Answer» Correct option is (b) TTL The best explanation: Consider using the TTL feature if your application requires some data to persist in the database for a limited period of time. |
|
239. |
To interact with embedded documents, use ___________ notation to “reach into” embedded documents.(a) period(b) dot(c) comma(d) colon |
Answer» Right choice is (b) dot To explain: References provides more flexibility than embedding. |
|
240. |
Point out the wrong statement.(a) Embedded data models make it possible to update related data in a single atomic write operation(b) Embedding related data in documents may lead to situations where documents grow after creation(c) With the MMAPv1 storage engine, document growth can impact write performance and lead to data fragmentation(d) All of the mentioned |
Answer» Right answer is (d) All of the mentioned Easiest explanation: In version 3.0.0, MongoDB uses Power of 2 Sized Allocations as the default allocation strategy for MMAPv1 in order to account for document growth, minimizing the likelihood of data fragmentation. |
|
241. |
A ____________ data model with embedded data combines all related data for a represented entity in a single document.(a) normalized(b) denormalized(c) non relational(d) relational |
Answer» Right choice is (b) denormalized For explanation: This facilitates atomic write operations since a single write operation can insert or update the data for an entity. |
|
242. |
Which of the following operations are atomic on document level?(a) update(b) remove(c) findAndModify(d) all of the mentioned |
Answer» Right answer is (d) all of the mentioned Explanation: In MongoDB, write operations, e.g. db.collection.update(), db.collection.findAndModify(), db.collection.remove(), are atomic on the level of a single document. |
|
243. |
Which of the following can store JavaScript functions for reuse?(a) store.js(b) system.js(c) system.store.js(d) save.js |
Answer» The correct choice is (b) system.js Easiest explanation: To store a function, you can use the db.collection.save(). |
|
244. |
To get the current number of namespaces in the mongo shell, use ________________(a) db.system.namespaces.countc()(b) db.system.namespaces.count(*)(c) db.system.namespaces.count()(d) all of the mentioned |
Answer» Correct choice is (c) db.system.namespaces.count() Easy explanation: The limit on the number of namespaces depend on the |
|
245. |
Point out the wrong statement.(a) The key decision in designing data models for MongoDB applications revolves around the structure of documents and how the application represents relationships between data(b) There are two tools that allow applications to represent these relationships: references and embedded documents(c) When designing data models, always consider the application usage of the data (i.e. queries, updates, and processing of the data) as well as the inherent structure of the data itself(d) All of the mentioned |
Answer» Right answer is (d) All of the mentioned For explanation I would say: Denormalized data models allow applications to retrieve and manipulate related data in a single database operation. |
|
246. |
Normalized data models describe relationships using ___________ between documents.(a) relativeness(b) references(c) evaluation(d) none of the mentioned |
Answer» The correct choice is (b) references The explanation is: Normalized data models can require more round trips to the server. |
|
247. |
Point out the correct statement.(a) $regex is used for regular expression pattern matches(b) $like is used for regular expression pattern matches(c) $reg is used for regular expression pattern matches(d) All of the mentioned |
Answer» Correct answer is (a) $regex is used for regular expression pattern matches Explanation: If your application needs to perform queries on the content of a field that holds text you can perform exact matches on the text. |
|
248. |
Which of the following The collection holds special JavaScript code for use in server side JavaScript?(a) .system.jserver(b) .system.jscript(c) .system.js(d) none of the mentioned |
Answer» Right option is (c) The best explanation: Do not store application logic in the database. |
|
249. |
In aggregation pipeline, the _______ pipeline stage provides access to MongoDB queries.(a) $catch(b) $match(c) $batch(d) All of the mentioned |
Answer» Correct choice is (b) $match To elaborate: Operations that modify existing documents (i.e. updates) use the same query syntax as queries to select documents to update. |
|
250. |
The Array of Ancestors pattern is slightly slower than the ________________ pattern.(a) Materialized Paths(b) Array of Ancestors(c) Nested Sets(d) None of the mentioned |
Answer» The correct answer is (a) Materialized Paths For explanation I would say: The Array of Ancestors pattern provides a fast and efficient solution to find the descendants and the ancestors of a node by creating an index on the elements of the ancestors field. |
|