How do you delete a database in MongoDB?
erase database
drop database
delete database
remove database
In the context of the Python MongoDB driver (PyMongo), what does the find_one() method return?
find_one()
A single document matching the query (or None if no match)
The number of documents matching the query
A cursor object for iterating over matching documents
A list of all documents matching the query
Which update operator replaces the value of a field with a specified value?
$set
$push
$inc
$rename
What is the purpose of replica sets in MongoDB?
Query Optimization
Data Sharding
Load Balancing
High Availability and Data Redundancy
What is the command to list all databases in a MongoDB instance?
display databases
all databases
show databases
list databases
What MongoDB shell command is used to insert a new document into a collection?
db.collection.create()
db.collection.add()
db.collection.put()
db.collection.insert()
Why might you drop and recreate an index instead of just updating it?
All of the above
To improve query performance after significant data changes
To rename the index
To change the index type
In the context of the $group stage, what does the _id field represent?
$group
_id
The total number of documents processed by the aggregation pipeline.
The unique identifier of the document within the collection.
The field used to group documents together based on a shared value.
A placeholder for a calculated aggregate value.
In MongoDB, a document is most similar to which concept in relational databases?
Column
Table
Database
Row
What is the basic unit of data in MongoDB?
Document