What does the upsert option do in an update operation?
upsert
Deletes the document if a match is found
Renames the collection
Creates a new document if no match is found
Updates multiple documents
Which command is used to create a new database in MongoDB?
new database
use database
make database
create database
What is the primary advantage of MongoDB's flexible schema design?
Reduced storage space requirements
Improved data integrity
Simplified data modeling and agility
Faster query performance
What is the command used to connect to a running MongoDB instance from the terminal?
connect_mongodb
start_mongo
mongodb-connect
mongo
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 total number of documents processed by the aggregation pipeline.
The unique identifier of the document within the collection.
What is the command to download the latest stable release of MongoDB Community Edition on most Linux systems?
sudo systemctl start mongod
mongosh
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
sudo apt-get install -y mongodb-org
What is a collection in MongoDB?
A user account
A group of databases
A specific data type
A table-like structure containing documents
Which data type in MongoDB ensures that all documents in a collection have a specific field?
mandatory
key
There is no such data type.
required
What is the role of the MongoClient object in a MongoDB Node.js application?
MongoClient
To define the database schema
To create and manage user accounts
To execute queries against the database
To establish a connection to the MongoDB server
How do you verify that the MongoDB server has started successfully?
All of the above
Try to connect to the MongoDB server using the mongo shell
Check the log file for messages indicating successful startup
Use the systemctl status mongod command to view the service's status