In MongoDB, a document is most similar to which concept in relational databases?
Column
Database
Table
Row
Which operator is used to match documents where a field's value is greater than a specified value?
$lte
$gt
$lt
$gte
In the context of the Python MongoDB driver (PyMongo), what does the find_one() method return?
find_one()
The number of documents matching the query
A list of all documents matching the query
A cursor object for iterating over matching documents
A single document matching the query (or None if no match)
Which is NOT a valid index type in MongoDB?
Hashed Index
Full Text Index
Array Index
Spatial Index
Which scenario suggests using a reference over embedding in MongoDB?
Accessing a user's profile data when they log in
Representing a many-to-many relationship, like students and courses
Fetching order details along with customer information
Retrieving comments for a specific blog post
What does the upsert option do in an update operation?
upsert
Renames the collection
Deletes the document if a match is found
Updates multiple documents
Creates a new document if no match is found
In the context of the $group stage, what does the _id field represent?
$group
_id
A placeholder for a calculated aggregate value.
The field used to group documents together based on a shared value.
The unique identifier of the document within the collection.
The total number of documents processed by the aggregation pipeline.
How are relationships between documents typically managed in MongoDB?
Embedded documents or references.
Foreign keys, like in relational databases.
Through data duplication across collections.
Joins, similar to SQL.
How do you verify that the MongoDB server has started successfully?
All of the above
Check the log file for messages indicating successful startup
Try to connect to the MongoDB server using the mongo shell
Use the systemctl status mongod command to view the service's status
What is the purpose of the insert_one() method in the Python MongoDB driver?
insert_one()
To delete a document from a collection
To update an existing document in a collection
To add a new document to a collection
To retrieve a single document from a collection