Which command starts the MongoDB daemon process in the background?
mongod --start
sudo systemctl start mongod
start mongodb
run mongod
Which command is used to create a new database in MongoDB?
use database
make database
create database
new database
What is the function of the $project stage in the aggregation pipeline?
$project
To sort documents in ascending or descending order.
To group documents based on shared values.
To reshape and transform the structure of output documents.
To filter documents based on matching criteria.
What is the primary advantage of MongoDB's flexible schema design?
Improved data integrity
Faster query performance
Reduced storage space requirements
Simplified data modeling and agility
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 enable full-text search capabilities
To enforce data integrity and prevent duplicates
What is the primary purpose of MongoDB drivers?
To perform data analysis within MongoDB
To store data in a relational database
To visualize data stored in MongoDB
To interact with MongoDB databases from application code
Which is NOT a valid index type in MongoDB?
Hashed Index
Spatial Index
Array Index
Full Text Index
Which of these is NOT a valid BSON data type?
float
string
character
boolean
How would you count the number of documents in each group using the $group stage?
$group
Use $total: 1
$total: 1
Use $sum: 1
$sum: 1
Use $count: 1
$count: 1
Use $size: 1
$size: 1
After adding the MongoDB repository to your system's package manager, which command updates the package list and installs the MongoDB server package?
mongod
sudo apt-get install -y mongodb-org
mongorestore