Which command is used to create a new database in MongoDB?
use database
make database
create database
new database
After adding the MongoDB repository to your system's package manager, which command updates the package list and installs the MongoDB server package?
sudo apt-get install -y mongodb-org
mongorestore
sudo systemctl start mongod
mongod
What is the command used to connect to a running MongoDB instance from the terminal?
mongodb-connect
mongo
connect_mongodb
start_mongo
What value for the index specification sorts in descending order?
1
null
0
-1
What is the role of a MongoDB cursor in the context of database interactions?
To define the structure of a document
To handle authentication and authorization for database access
To store the results of a query, allowing for iteration over the returned documents
To create and manage indexes on a collection
Which of the following is NOT a key feature of MongoDB?
Support for ACID transactions
High Scalability and Performance
Flexible document structure
Schema-less data model
The Attribute Pattern in MongoDB is best suited for:
Representing hierarchical relationships between entities
Managing evolving schemas and varying attributes for different documents
Optimizing geospatial queries for location-based data
Storing a large, sparse matrix of data
MongoDB's ability to handle massive datasets and high traffic is attributed to its:
Horizontal scaling capabilities
Strong data consistency guarantees
Advanced indexing techniques
Use of SQL for querying
What type of index would be most suitable for a field containing unique user IDs?
Text Index
Single Field Index
Geospatial Index
Multikey Index
What is the role of the MongoClient object in a MongoDB Node.js application?
MongoClient
To define the database schema
To execute queries against the database
To create and manage user accounts
To establish a connection to the MongoDB server