What is the BSON data type for storing an array of values in MongoDB?
list
object
array
set
In a MongoDB cluster, which component acts as a query router and distributes requests to the appropriate shards?
Primary Node
Mongos
Config Server
Replica Set
Which operator is used to match documents where a field's value is greater than a specified value?
$lte
$gte
$lt
$gt
Which schema design pattern in MongoDB is suitable for storing time-series data like sensor readings?
Bucket Pattern
Subset Pattern
Extended Reference Pattern
Attribute Pattern
How do you delete a database in MongoDB?
erase database
drop database
remove database
delete database
What is the difference between deleteOne() and deleteMany() in MongoDB?
deleteOne()
deleteMany()
deleteOne() deletes the first matching document, while deleteMany() deletes all matching documents.
deleteOne() deletes documents permanently, while deleteMany() moves them to the trash.
deleteOne() deletes all documents, while deleteMany() deletes only the specified number of documents.
There is no difference; both commands perform the same action.
What is a collection in MongoDB?
A user account
A specific data type
A group of databases
A table-like structure containing documents
Can you use multiple $match stages within a single aggregation pipeline?
$match
It depends on the version of MongoDB you are using.
Yes, you can use multiple $match stages, and their order matters.
Yes, you can use multiple $match stages, but their order doesn't matter.
No, you can only use one $match stage per aggregation pipeline.
Which of these is NOT a valid BSON data type?
character
boolean
float
string
What Java class is commonly used with the MongoDB Java driver to interact with MongoDB collections?
MongoClient
MongoCursor
MongoCollection
MongoDatabase