What is the primary purpose of indexing in MongoDB?
To compress data and reduce storage space
To store data in a sorted order for faster retrieval
To enforce data integrity and prevent duplicates
To enable full-text search capabilities
What value for the index specification sorts in descending order?
0
-1
null
1
What is the default data directory for MongoDB?
/var/lib/mongodb
/log/mongodb.log
/bin/mongod
/etc/mongodb.conf
What is the command to download the latest stable release of MongoDB Community Edition on most Linux systems?
sudo apt-get install -y mongodb-org
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
mongosh
sudo systemctl start mongod
Which update operator replaces the value of a field with a specified value?
$rename
$push
$set
$inc
Which data type would you use to store a date and time in MongoDB?
timestamp
date
datetime
string
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 of these is NOT a valid BSON data type?
float
boolean
character
Which scenario suggests using a reference over embedding in MongoDB?
Representing a many-to-many relationship, like students and courses
Accessing a user's profile data when they log in
Retrieving comments for a specific blog post
Fetching order details along with customer information
What is the primary difference between SQL and MongoDB's data models?
SQL is NoSQL, MongoDB is relational.
SQL is table-based, MongoDB is document-based.
SQL is document-based, MongoDB is table-based.
SQL uses JSON, MongoDB uses BSON.