What is the default data directory for MongoDB?
/var/lib/mongodb
/log/mongodb.log
/bin/mongod
/etc/mongodb.conf
When is it generally preferred to embed data in a document rather than referencing it in MongoDB?
When minimizing document size is a top priority
When maintaining data integrity across multiple collections is crucial
When the related data is frequently accessed together with the main document
When the related data is rarely accessed
Which update operator replaces the value of a field with a specified value?
$push
$rename
$set
$inc
What is the primary advantage of MongoDB's flexible schema design?
Simplified data modeling and agility
Improved data integrity
Faster query performance
Reduced storage space requirements
What is the command to list all databases in a MongoDB instance?
display databases
show databases
all databases
list databases
Which command creates a new collection in the currently active database?
db.createCollection()
new collection()
make collection
create collection
What is a potential drawback of excessive embedding in MongoDB?
Inability to represent one-to-many relationships effectively
Increased query complexity and reduced performance
Larger document sizes, potentially impacting storage and retrieval speed
Difficulties in updating related data consistently
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
Check the log file for messages indicating successful startup
Use the systemctl status mongod command to view the service's status
The Attribute Pattern in MongoDB is best suited for:
Optimizing geospatial queries for location-based data
Managing evolving schemas and varying attributes for different documents
Representing hierarchical relationships between entities
Storing a large, sparse matrix of data
Which command is used to create a new database in MongoDB?
create database
new database
use database
make database