What value for the index specification sorts in descending order?
1
0
-1
null
Which of these is NOT a valid BSON data type?
float
boolean
string
character
How do you remove a collection named "products" from a MongoDB database?
drop products
delete products
db.products.drop()
remove collection products
How would you count the number of documents in each group using the $group stage?
$group
Use $total: 1
$total: 1
Use $count: 1
$count: 1
Use $sum: 1
$sum: 1
Use $size: 1
$size: 1
What is the primary purpose of MongoDB drivers?
To visualize data stored in MongoDB
To perform data analysis within MongoDB
To store data in a relational database
To interact with MongoDB databases from application code
Which of the following is NOT a valid CRUD operation in MongoDB?
Create
Delete
Retrieve
Update
When is it generally preferred to embed data in a document rather than referencing it in MongoDB?
When maintaining data integrity across multiple collections is crucial
When the related data is rarely accessed
When the related data is frequently accessed together with the main document
When minimizing document size is a top priority
In the context of the Python MongoDB driver (PyMongo), what does the find_one() method return?
find_one()
A cursor object for iterating over matching documents
A list of all documents matching the query
The number of documents matching the query
A single document matching the query (or None if no match)
Which data type would you use to store a date and time in MongoDB?
datetime
timestamp
date
When creating a single field index, what value indicates ascending sort order?
ASC
DESC