

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.
51. |
Point out the correct statement.(a) MongoDB stores chunks on disk in the XML serialization format(b) MongoDB stores documents on disk in the BSON serialization format(c) MongoDB stores documents on RAM in the JSON serialization format(d) All of the mentioned |
Answer» Correct choice is (a) MongoDB stores chunks on disk in the XML serialization format The explanation: BSON documents may have more than one field with the same name. |
|
52. |
BSON is a binary representation of ________ documents.(a) JSON(b) XML(c) JScript(d) All of the mentioned |
Answer» Correct answer is (a) JSON Easy explanation: BSON contains more data types than JSON. |
|
53. |
Point out the wrong statement.(a) MongoDB Cloud Manager Backup offers point in time recovery of MongoDB replica sets(b) MongoDB Cloud Manager continually backs up MongoDB replica sets(c) MMS achieves point in time recovery by storing oplog data(d) None of the mentioned |
Answer» Right answer is (c) MMS achieves point in time recovery by storing oplog data The best I can explain: MongoDB Cloud Manager Backup also offers a consistent snapshot of sharded clusters. |
|
54. |
If your storage system does not support snapshots, you can copy the files directly using ____________(a) cp(b) copy(c) snap(d) none of the mentioned |
Answer» Correct option is (a) cp Easy explanation: Since copying multiple files is not an atomic operation, you must stop all writes to the mongod before copying the files. |
|
55. |
The _______ tool reads data from a MongoDB database and creates high fidelity BSON files.(a) mdump(b) mongodump(c) mongod(d) all of the mentioned |
Answer» The correct option is (b) mongodump Explanation: mongodump is a utility for creating a binary export of the contents of a database. |
|
56. |
The ___________ JavaScript shell and the MongoDB language drivers translate between BSON and the language-specific document representation.(a) mongod(b) mongo(c) json(d) none of the mentioned |
Answer» Correct choice is (b) mongo Explanation: MongoDB stores documents on disk in the BSON serialization format. BSON is a binary representation of JSON documents, though it contains more data types than JSON. |
|
57. |
The _________ tool can populate a MongoDB database with the data from these BSON files.(a) mongostore(b) mongorestore(c) mongod(d) none of the mentioned |
Answer» Right choice is (b) mongorestore The explanation: This tool is not ideal for capturing backups of larger systems. |
|
58. |
If applications modify data while mongodump is creating a backup _________ will compete for resources with those applications.(a) mongostore(b) mongorestore(c) mongod(d) mongodump |
Answer» Correct answer is (d) mongodump The explanation: Applications may continue modifying data while mongodump captures the output. |
|
59. |
Point out the wrong statement.(a) Authorization determines the verified user’s access to resources and operations(b) MongoDB does not support authentication mechanisms(c) To authenticate a client in MongoDB, you must add a corresponding user to MongoDB(d) None of the mentioned |
Answer» Right choice is (b) MongoDB does not support authentication mechanisms Easiest explanation: In addition to verifying the identity of a client, MongoDB can require members of replica sets and sharded clusters to authenticate their membership. |
|
60. |
_________ is a challenge-response mechanism that authenticates users through passwords.(a) SCRAM-SHA-1(b) LDAP(c) MONGODB-CR(d) None of the mentioned |
Answer» The correct option is (c) MONGODB-CR Easy explanation: Using key files, you can also use MONGODB-CR authentication for the internal member authentication of replica set members and sharded cluster members. |
|
61. |
MongoDB employs _________ to govern access to a MongoDB system.(a) RBAS(b) RBAC(c) RBCC(d) None of the mentioned |
Answer» The correct answer is (b) RBAC Easiest explanation: RBAC stands for Role-Based Access Control. |
|
62. |
Point out the correct statement.(a) MongoDB provides built-in roles, each with a dedicated purpose for a common use case(b) MongoDB does not enable authorization by default(c) Administrators also can create new roles and privileges to cater to operational needs(d) All of the mentioned |
Answer» Correct answer is (b) MongoDB does not enable authorization by default Explanation: You can enable authorization using the –auth or the –keyFile options, or if using a configuration file, with the security.authorization or the security.keyFile settings. |
|
63. |
__________ consists of a specified resource and the actions permitted on the resource.(a) privilege(b) action(c) command(d) right |
Answer» Correct option is (a) privilege For explanation: A privilege resource is either a database, collection, set of collections, or the cluster. |
|
64. |
Point out the correct statement.(a) MongoDB distributions are currently available for Mac OS X, Linux, Windows Server 2012, Windows Server 2008 R2 64bit, Windows 7 (64 bit), Windows Vista, and Solaris(b) The MongoDB distribution for Solaris include support for the WiredTiger storage engine(c) mongod will not start if dbPath contains data files created by a storage engine(d) None of the mentioned |
Answer» Correct choice is (b) The MongoDB distribution for Solaris include support for the WiredTiger storage engine The explanation is: The MongoDB distribution for Solaris does not include support for the WiredTiger storage engine. |
|
65. |
_________ provides all the privileges of the read role.(a) delete(b) update(c) readWrite(d) none of the mentioned |
Answer» Right choice is (c) readWrite Easy explanation: The role provides the ability to modify data on all non-system collections and the system.js collection. |
|
66. |
Point out the wrong statement.(a) User principal names have the form: @(b) For MongoDB, the defaults to mongodb(c) Every MongoDB mongod and mongos instance must have an associated service principal(d) All of the mentioned |
Answer» Right option is (b) For MongoDB, the For explanation: User principal names have the form: |
|
67. |
Applications can also control the behavior of write operations using _______ concern.(a) read(b) write(c) truncate(d) all of the mentioned |
Answer» The correct option is (b) write The explanation is: Write concern semantics allow clients to specify the assurance that MongoDB provides when reporting on the success of a write operation. |
|
68. |
The _________ field provides the amount of resident memory in use.(a) mem.resident(b) memory.resident(c) mem.resident(d) all of the mentioned |
Answer» Correct choice is (c) mem.resident To explain: If this exceeds the amount of system memory and there is a significant amount of data on disk that isn’t in RAM, you may have exceeded the capacity of your system. |
|
69. |
Administrators can implement collection-level access control through user-defined __________(a) roles(b) replica sets(c) shards(d) none of the mentioned |
Answer» The correct option is (a) roles To elaborate: By creating a role with privileges that are scoped to a specific collection in a particular database, administrators can provision users with roles that grant privileges on a collection level. |
|
70. |
___________ allows administrators to define and limit the resources and operations that a user can access.(a) Access(b) Authentication(c) Authorization(d) All of the mentioned |
Answer» Correct option is (c) Authorization For explanation: Using authentication and authorization is a key part of a complete security strategy. |
|
71. |
Which of the following operation adds a new document to the users collection?(a) add(b) insert(c) truncate(d) drop |
Answer» Right choice is (b) insert To explain I would say: For the update and delete operations, you can specify the criteria to select the documents to update or remove. |
|
72. |
The ______ factor is a constant and known property of the currency.(a) rank(b) scale(c) high(d) none of the mentioned |
Answer» The correct answer is (b) scale For explanation I would say: Applications can determine the scale factor from the currency. |
|
73. |
Use of the approximation field for the query and sort operations requires that applications perform _______ side post-processing.(a) client(b) server(c) application(d) none of the mentioned |
Answer» Correct answer is (a) client To explain I would say: Client side processing is used to decode the non-numeric representation of the exact value and then filter out the returned documents based on the exact monetary value. |
|
74. |
_____________ is used to initiate relica member set.(a) rs.rep()(b) rs.init()(c) rs.initiate()(d) none of the mentioned |
Answer» The correct answer is (c) rs.initiate() Best explanation: MongoDB initiates a set that consists of the current member and that uses the default replica set configuration. |
|
75. |
Which of the following query is used to generate a new ObjectId, use the ObjectId() constructor with no argument?(a) x = ObjectIdAdd()(b) x = addObjectId()(c) x = ObjectId()(d) none of the mentioned |
Answer» Right option is (c) x = ObjectId() The best I can explain: ObjectId() constructor is used with no argument for new object. |
|
76. |
On Linux, MongoDB clients can use Kerberos’s _______ program to initialize a credential cache for authenticating the user principal to servers.(a) knight(b) kinit(c) Knite(d) None of the mentioned |
Answer» Right option is (b) kinit The explanation is: Unlike on Linux systems, mongod and mongos instances running on Windows do not require access to keytab files. |
|
77. |
Which of the following checks and repairs errors and inconsistencies in data storage?(a) repairDatabase(b) repairedDatabase(c) recoverDatabase(d) all of the mentioned |
Answer» The correct answer is (a) repairDatabase To elaborate: repairDatabase is analogous to an fsck command for file systems. |
|
78. |
Point out the wrong statement.(a) REST does provide administrative access, and its accessibility represents a vulnerability in a secure environment(b) REST API does provide any support for insert, update, or remove operations(c) The net.http.RESTInterfaceEnabled configuration makes the http status interface, which is read-only by default, fully interactive(d) None of the mentioned |
Answer» Right choice is (b) REST API does provide any support for insert, update, or remove operations The best I can explain: REST API does not provide any support for insert, update, or remove operations. |
|
79. |
Point out the correct statement.(a) An equality match on the unique _id field is less selective as it can match at most one document(b) The selectivity of regular expressions depends on the expressions themselves(c) Less selective queries can use indexes effectively or even at all(d) All of the mentioned |
Answer» Correct option is (b) The selectivity of regular expressions depends on the expressions themselves The best explanation: If an index exists for the field, then MongoDB matches the regular expression against the values in the index, which can be faster than a collection scan. |
|
80. |
_________ is used to view statistics about the query plan for a given query.(a) db.explain()(b) cursor.explain()(c) cursor.explainstats()(d) all of the mentioned |
Answer» The correct choice is (b) cursor.explain() To elaborate: This information can help as you develop indexing strategies. |
|
81. |
The update() method uses the _______ command, which uses the default write concern.(a) find(b) read(c) update(d) modify |
Answer» Right option is (c) update Easy explanation: The update() method returns an object that contains the status of the operation. |
|
82. |
On _________ mongo.exe reads the .mongorc.js file from %HOME%.mongorc.js.(a) Windows(b) Linux(c) Mac(d) Solaris |
Answer» Right choice is (a) Windows Easiest explanation: On Linux and Unix systems, mongo reads the .mongorc.js file from $HOME/.mongorc.js. |
|
83. |
The mongo shell loads and parses the ___________ file on startup.(a) mongo.js(b) mongoc.js(c) mongorc.js(d) all of the mentioned |
Answer» The correct choice is (c) mongorc.js Explanation: Store the function in your .mongorc.js file. |
|
84. |
If a .mongorc.js file exists, the mongo shell will evaluate a __________ file before starting.(a) .mongorc.js(b) .mongo.js(c) .mongorc.jscript(d) all of the mentioned |
Answer» The correct option is (a) .mongorc.js For explanation: You can disable this behavior by passing the mongo –norc option. |
|
85. |
__________ returns the JavaScript representation in the form of a string literal.(a) toStringJava()(b) toString()(c) String()(d) none of the mentioned |
Answer» Right option is (b) toString() To explain I would say: In previous versions, toString() returns the hexadecimal string representation, which as of version 2.2 can be retrieved by the str property. |
|
86. |
The ______ field is always the first field in the document.(a) _id(b) id(c) Ob_id(d) None of the mentioned |
Answer» Right option is (a) _id For explanation: Updates that include renaming of field names may result in the reordering of fields in the document. |
|
87. |
To ensure functioning replication, do not store values that are of the _______ regular expression type in the _id field.(a) JSON(b) XML(c) JScript(d) None of the mentioned |
Answer» Right option is (d) None of the mentioned Best explanation: The _id field may contain values of any BSON data type, other than an array. |
|
88. |
Point out the wrong statement.(a) The field names cannot start with the dollar sign ($) character(b) The field names cannot contain the dot (.) character(c) The field names cannot contain the null character(d) None of the mentioned |
Answer» The correct answer is (d) None of the mentioned For explanation I would say: Documents have certain restrictions on field names. |
|
89. |
Which of the field is reserved for use as a primary key?(a) _id(b) _uid(c) _uuid(d) All of the mentioned |
Answer» Correct answer is (a) _id Easiest explanation: ID value value must be unique in the collection, is immutable, and may be of any type other than an array. |
|
90. |
Object_Id is similar to _________ key in Relational Databases.(a) primary(b) secondary(c) composite(d) all of the mentioned |
Answer» The correct option is (a) primary Explanation: Object_Id is unique and cannot be changed. |
|
91. |
If the indexed field in a document is not a _____ or an array that holds a date value(s), the document will not expire.(a) DATE(b) TIME(c) DATETIME(d) All of the mentioned |
Answer» Correct choice is (a) DATE Easiest explanation: Built-in first-in-first-out property maintains the order of events while managing storage use. |
|
92. |
Point out the correct statement.(a) Data expiration is useful for some classes of information, including machine generated event data, logs, and session information(b) A special TTL index property supports the implementation of TTL collections(c) TTL collections make it possible to store data in MongoDB and have the mongod automatically remove data after a specified number of seconds or at a specific clock time(d) All of the mentioned |
Answer» Right option is (d) All of the mentioned The best I can explain: The TTL feature relies on a background thread in mongod that reads the date-typed values in the index and removes expired documents from the collection. |
|
93. |
“Sharding” a database across many server instances can be achieved with _______________(a) LAN(b) SAN(c) MAN(d) All of the mentioned |
Answer» Right answer is (b) SAN Explanation: “Sharding” a database across many server instances can be achieved with SQL databases, but usually is accomplished through SANs and other complex arrangements for making hardware act as a single server. |
|
94. |
Point out the wrong statement.(a) Non Relational databases require that schemas be defined before you can add data(b) NoSQL databases are built to allow the insertion of data without a predefined schema(c) NewSQL databases are built to allow the insertion of data without a predefined schema(d) All of the mentioned |
Answer» Correct answer is (a) Non Relational databases require that schemas be defined before you can add data Explanation: There’s also no way, using a relational database, to effectively address data that’s completely unstructured or unknown in advance. |
|
95. |
On Linux systems, the ________ interface provides access to the underlying netfilter firewall.(a) ssip(b) iptables(c) dns(d) all of the mentioned |
Answer» The correct option is (b) iptables To explain I would say: Firewalls allow administrators to filter and control access to a system by providing granular control over what network communications. |
|
96. |
By default, the policy in ___________ Firewall allows all outbound connections and blocks all incoming connections.(a) Windows(b) Linux(c) Mac(d) None of the mentioned |
Answer» Correct option is (a) Windows The explanation: Given the default ports of all MongoDB processes, you must configure networking rules that permit only required communication between your application and the appropriate mongod.exe and mongos.exe instances. |
|
97. |
MongoDB users who use VPNs use ________ rather than IPSEC VPNs for performance issues.(a) TTS(b) SSL(c) LTS(d) None of the mentioned |
Answer» The correct answer is (b) SSL The explanation: Virtual private networks, or VPNs, make it possible to link two networks over an encrypted and limited-access trusted network. |
|
98. |
The _______ API to MongoDB provides additional information and write access on top of the HTTP status interface.(a) Web(b) REST(c) RestFul(d) All of the mentioned |
Answer» Right option is (b) REST The best I can explain: The REST interface is disabled by default, and is not recommended for production use. |
|
99. |
Which of the following flag can be set by mongo shell?(a) Timeout(b) noTimeout(c) Time(d) None of the mentioned |
Answer» Right option is (b) noTimeout For explanation: By default, the server will automatically close the cursor after 10 minutes of inactivity or if client has exhausted the cursor. |
|
100. |
Point out the correct statement.(a) Intervening read operations on a document may result in a cursor that returns a document more than once if that document has changed(b) The MongoDB server returns the query results in batches(c) Subsequent batch size is 50 megabytes(d) None of the mentioned |
Answer» Right choice is (b) The MongoDB server returns the query results in batches The explanation: For most queries, the first batch returns 101 documents or just enough documents to exceed 1 megabyte. |
|