R4RIN
Articles
Java 8
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 4
Choose a topic to test your knowledge and improve your MongoDB skills
1. The ________ message is used to update a document in a collection.
UPDATE
OP_UPDATE
OP_UPDATES
All of the Mentioned
2. Point out the correct statement.
An equality match on the unique _id field is less selective as it can match at most one document
The selectivity of regular expressions depends on the expressions themselves
Less selective queries can use indexes effectively or even at all
All of the mentioned
3. ___ can modify specific fields of an existing document or documents or replace an existing document entirely, depending on the update parameter.
modify()
update()
find()
None of the mentioned
4. The update() method uses the _______ command, which uses the default write concern.
find
read
update
modify
5. ____ is used to view statistics about the query plan for a given query.
db.explain()
cursor.explain()
cursor.explainstats()
All of the Mentioned
6. A ________ query plan has returned a threshold number of matching results.
execution
unordered
ordered
None of the mentioned
7. A query _______ consists of a combination of query, sort, and projection specifications.
plan
shape
stats
All of the Mentioned
8. ____ store the relationships between data by including links or references from one document to another.
Capped
Embedded
External
References
9. Point out the correct statement.
In practice, the documents in a collection share a different structure
Data in MongoDB has a flexible schema
The key challenge in data modeling is balancing the needs of the application, the performance characteristics of the database engine, and the data retrieval patterns
None of the mentioned
10. In MongoDB, write operations are atomic at the __________ level.
collection
document
row
All of the mentioned
11. ______ documents capture relationships between data by storing related data in a single document structure.
Capped
Embedded
External
Internal
12. Point out the wrong statement.
The key decision in designing data models for MongoDB applications revolves around the structure of documents and how the application represents relationships between data
There are two tools that allow applications to represent these relationships: references and embedded documents
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
All of the Mentioned
13. A _____ data model with embedded data combines all related data for a represented entity in a single document.
normalized
denormalized
non relational
relational
14. For the __________ storage engine, if the document size exceeds the allocated space for that document, MongoDB relocates the document on disk.
MAPv1
MAPv2
MAPv3
MAPv4
15. With MongoDB 3.0.0, the default use of the Power of _________ Allocations minimizes the occurrences of re-allocations as well as allows for the effective reuse of the freed record space.
2 Sized
3 Sized
4 Sized
5 Sized
16. ______ strategy is used to explicitly avoid document growth.
deallocation
allocation
pre-allocation
none of the mentioned
17. Each index in MongoDB requires at least _________ of data space.
8KB
28KB
68KB
108KB
18. ______ data models allow applications to store related pieces of information in the same database record.
Reference
Embedded
External
None of the mentioned
19. Point out the correct statement.
With MongoDB, you cannot embed related data in a single structure or document
The key consideration for the structure of your documents is the decision to embed or to use references
Reference schema is generally known as “denormalized” models
None of the mentioned
20. Embedded data model is used when you have _________ relationships between entities.
contains
isa
inheritance
All of the Mentioned
21. Normalized data models describe relationships using ___________ between documents.
relativeness
references
evaluation
None of the mentioned
22. Point out the wrong statement.
Embedded data models make it possible to update related data in a single atomic write operation
Embedding related data in documents may lead to situations where documents grow after creation
With the MMAPv1 storage engine, document growth can impact write performance and lead to data fragmentation
All of the Mentioned
23. To interact with embedded documents, use ___________ notation to “reach into” embedded documents.
period
dot
comma
colon
24. MongoDB using the mmapv1 storage engine has limits on the number of ____
namespaces
collections
documents
None of the mentioned
25. To get the current number of namespaces in the mongo shell, use ______
db.system.namespaces.countc()
db.system.namespaces.count(*)
db.system.namespaces.count()
All of the Mentioned
26. The __________ feature of collections expires documents after a period of time.
TEL
TTL
TPL
None of the mentioned
27. Capped collections provide __________ management of inserted documents in MongoDB.
FIFO
LIFO
LRU
MRU
28. ______ is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.
DataFS
GridFS
ReadFS
None of the mentioned
29. Point out the wrong statement.
By default GridFS limits chunk size to 255k
GridFS is useful only for storing files that exceed 16MB
When you query a GridFS store for a file, the driver or client will reassemble the chunks as needed
All of the Mentioned
30. How many does collections GridFS use to store files?
1
2
3
4
31. The default chunk size is changed from 256k to 255k in which version?
3.0
2.4.9
2.4.10
none of the mentioned
32. Point out the wrong statement.
Client libraries provide a convenient, injection free, process to build these objects
MongoDB represents queries as BSON objects
Field names in MongoDB’s query language have semantic meaning
All of the Mentioned
33. Which of the collection in GridFS stores the binary chunks?
chunks
files
data
log
34. _____ is the _id is of the data type chosen for the original document in files collections.
files._id
file._id
fileobj._id
none of the mentioned
35. Which of the following checks and repairs errors and inconsistencies in data storage?
repairDatabase
repairedDatabase
recoverDatabase
All of the Mentioned
36. The files_id field contains the _id of the chunk’s __________ document.
parent
child
top
None of the mentioned
37. Which of the following field allows efficient retrieval of chunks?
n
name
object
2n
38. Which of the following relationship uses references to describe documents between connected data?
One-to-One Relationships with Embedded Documents
One-to-Many Relationships with Embedded Documents
One-to-Many Relationships with Document References
None of the mentioned
39. Point out the correct statement.
One-to-One Relationships with embedded documents presents a data model that uses embedded documents to describe one-to-one relationships between connected data
One-to-One Relationships with document references presents a data model that uses embedded documents to describe one-to-one relationships between connected data
One-to-Many Relationships with embedded documents presents a data model that uses embedded documents to describe one-to-one relationships between connected data
All of the mentioned
40. 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" }
{ _id: "joe", name: "Joe Bookreader", address: { street: "123 Fake Street", city: "Faketon", state: "MA", zip: "12345"
{ _id: "joe", name: "Joe Bookreader", address-> { street: "123 Fake Street", city: "Faketon", state: &quo
{ _id: "joe", name: "Joe Bookreader", address:: { street: "123 Fake Street", city: "Faketon", state: "M
All of the Mentioned
41. Which of the following is used to avoid the repetition of data in MongoDB schema?
DeReferences
References
Cursor
Collectors
42. Point out the wrong statement.
Decisions that affect how you model data can affect application performance and database capacity
Collections do enforce document structure
Data in MongoDB has a flexible schema
None of the mentioned
43. ____ define what records to select for read, update, and delete operations.
Query optimizer
Query selector
Update definitions
All of the mentioned
44. The ___________ JavaScript shell and the MongoDB language drivers translate between BSON and the language-specific document representation.
mongod
mongo
json
none of the mentioned
45. Which of the following statement is incorrect about documents in MongoDB?
The field names cannot start with the dollar sign ($) character
The field names cannot contain the dot (.) character
The field names cannot contain the null character
None of the mentioned
46. The ________ References pattern stores each tree node in a document; in addition to the tree node, the document stores the id of the node’s parent.
Child
Parent
Root
None of the mentioned
47. Point out the correct statement.
The query to retrieve the parent of a node is fast and straightforward
The query to retrieve the parent of a node is slow and straightforward
The query to retrieve the parent of a node is slow and complex
All of the Mentioned
48. The ________ Links pattern provides a simple solution to tree storage but requires multiple queries to retrieve subtrees.
Child
Parent
Root
All of the Mentioned
49. The _________ References pattern stores each tree node in array the id(s) of the node’s children.
Child
Parent
Root
none of the mentioned
50. Point out the wrong statement.
You cannot query for a node in the children field to find its parent node only
You can query for a node in the children field to find its parent node as well as its siblings
You can query for a node in the children field to find its siblings only
None of the mentioned
Submit