Bson Datatype(Engineering > Computer Science And Engineering > Mongodb > Gridfs ) Questions and Answers
Question 1. MongoDB represents queries as ___________ objects.
BSON
JSON
GSON
None of the mentioned
Explanation:-
Answer: Option A. -> BSON
As a client program assembles a query in MongoDB, it builds a BSON object, not a string.
Question 2. If your storage system does not support snapshots, you can copy the files directly using :
cp
copy
snap
None of the mentioned
Explanation:-
Answer: Option A. -> cp
Since copying multiple files is not an atomic operation, you must stop all writes to the mongod before copying the files.
Question 3. When you query a GridFS store for a file, the _______ will reassemble the chunks as needed.
client
server
agent
None of the mentioned
Explanation:-
Answer: Option A. -> client
You also can access information from arbitrary sections of files, which allows you to "skip into the middle of a video or audio file.
Question 4. The _______ tool reads data from a MongoDB database and creates high fidelity BSON files.
mdump
mongodump
mongod
All of the mentioned
Explanation:-
Answer: Option B. -> mongodump
mongodump is a utility for creating a binary export of the contents of a database.
Question 5. To store documents larger than the maximum size, MongoDB provides the _______ API.
Grid
MMS
GridFS
None of the mentioned
Explanation:-
Answer: Option C. -> GridFS
MongoDB preserves the order of the document fields following write operations.
Question 6. User-defined indexes on multiple fields is called :
composite index
secondary index
compound index
None of the mentioned
Explanation:-
Answer: Option C. -> compound index
The order of fields listed in a compound index has significance.
Question 7. The ________ reflect the amount of storage used, the quantity of data contained in the database, and object, collection, and index counters.
dbStats
db.serverStatus()
db.statserver()
None of the mentioned
Explanation:-
Answer: Option A. -> dbStats
The dbStats command, or db.stats() from the shell, returns a document that addresses storage use and data volumes.
Question 8. In the mongo shell, you can access the creation time of the ObjectId, using the ______ method..
getTime()
getTimestamp()
Timestamp()
None of the mentioned
Explanation:-
Answer: Option B. -> getTimestamp()
MongoDB clients should add an _id field with a unique ObjectId.
Question 9. Point out the correct statement :
The mechanics of snapshots depend on the underlying storage system
To get a consistent snapshot of a sharded system, you must disable the balancer
If your storage system does not support snapshots, you can copy the files directly using cp, rsync, or a similar tool
All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
Backups produced by copying the underlying data do not support point in time recovery for replica sets and are difficult to manage for larger sharded clusters.
Question 10. Point out the correct statement :
Config servers are not replica sets
Sharding requires a number of mongod instances with different configurations
The config servers store the cluster's metadata, while the cluster distributes data among one or more shard servers
None of the mentioned
Explanation:-
Answer: Option D. -> None of the mentioned
The command line and configuration file interfaces provide MongoDB administrators with a large number of options and settings for controlling the operation of the database system.