Which of the following is NOT a key consideration when designing a schema in MongoDB?
Document size and growth potential
Data relationships and access patterns
Query patterns and performance requirements
Data normalization to eliminate redundancy
Which command creates a new collection in the currently active database?
make collection
db.createCollection()
create collection
new collection()
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 uses JSON, MongoDB uses BSON.
SQL is document-based, MongoDB is table-based.
In MongoDB, a document is most similar to which concept in relational databases?
Column
Table
Row
Database
What is the role of the MongoClient object in a MongoDB Node.js application?
MongoClient
To create and manage user accounts
To establish a connection to the MongoDB server
To define the database schema
To execute queries against the database
Which scenario suggests using a reference over embedding in MongoDB?
Accessing a user's profile data when they log in
Retrieving comments for a specific blog post
Representing a many-to-many relationship, like students and courses
Fetching order details along with customer information
How do you switch to a specific database, for example, a database named 'myDatabase', in the MongoDB shell?
use myDatabase
change to myDatabase
switch to myDatabase
connect myDatabase
What does the $avg operator calculate within the $group stage?
$avg
$group
The minimum value of a field in each group.
The total count of documents in each group.
The average value of a field in each group.
The maximum value of a field in each group.
What is the purpose of the insert_one() method in the Python MongoDB driver?
insert_one()
To update an existing document in a collection
To retrieve a single document from a collection
To add a new document to a collection
To delete a document from a collection
Which operator is used to match documents where a field's value is greater than a specified value?
$gte
$lt
$lte
$gt