What is the command used to connect to a running MongoDB instance from the terminal?
mongodb-connect
start_mongo
connect_mongodb
mongo
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.
The Attribute Pattern in MongoDB is best suited for:
Managing evolving schemas and varying attributes for different documents
Optimizing geospatial queries for location-based data
Representing hierarchical relationships between entities
Storing a large, sparse matrix of data
What is a potential drawback of excessive embedding in MongoDB?
Increased query complexity and reduced performance
Inability to represent one-to-many relationships effectively
Larger document sizes, potentially impacting storage and retrieval speed
Difficulties in updating related data consistently
How do you switch to a specific database, for example, a database named 'myDatabase', in the MongoDB shell?
switch to myDatabase
change to myDatabase
connect myDatabase
use myDatabase
How do you remove a collection named "products" from a MongoDB database?
remove collection products
db.products.drop()
drop products
delete products
How do you verify that the MongoDB server has started successfully?
Try to connect to the MongoDB server using the mongo shell
All of the above
Use the systemctl status mongod command to view the service's status
Check the log file for messages indicating successful startup
Which schema design pattern in MongoDB is suitable for storing time-series data like sensor readings?
Bucket Pattern
Subset Pattern
Attribute Pattern
Extended Reference Pattern
What value for the index specification sorts in descending order?
0
-1
1
null
Which of the following best describes the relationship between documents and collections in MongoDB?
Collections define the structure of a document
Documents and collections are unrelated
Collections are made up of multiple documents
Documents are fields within a collection