NOSQL-OBJECTIVE QUESTION BANK -MID-1
NOSQL-OBJECTIVE QUESTION BANK -MID-1
UNIT-1
BITBANK
6. “Sharding” a database across many server instances can be achieved with _______________
a) LAN b) SAN c) MAN d) All of the mentioned
Answer: b
Explanation: “Sharding” a database across many server instances can be achieved with SQL
databases, but usually is accomplished through SANs and other complex arrangements for making
hardware act as a single server.
7. HBase is a distributed ________ database built on top of the Hadoop file system.
a) Column-oriented b) Row-oriented
Answer: d
Explanation: Graph stores include Neo4J and HyperGraphDB
8. NoSQL databases is used mainly for handling large volumes of ______________ data.
a) unstructured b) structured c) semi-structured d) all of the mentioned
Answer: a
Explanation: MongoDB is an a typical choice for unstructured data storage
10. ________ stores are used to store information about networks, such as social connections.
a) Key-value b) Wide-column c) Document d) Graph
Answer: d
Explanation: Graph stores include Neo4J and HyperGraphDB
11. NoSQL databases is used mainly for handling large volumes of ______________ data.
a) unstructured b) structured c) semi-structured d) all of the mentioned
Answer: a
Explanation: MongoDB is an a typical choice for unstructured data storage.
12. A query may include a ___________ that specifies the fields from the matching documents to
return.
a) selection b) projection c) union d) none of the mentioned
Answer: b
Explanation: Queries specify criteria, or conditions, that identify the documents that MongoDB
returns to the clients.
15. Which of the following operation adds a new document to the users collection?
a) add b) insert c) truncate d) drop
Answer: b
Explanation: For the update and delete operations, you can specify the criteria to select the
documents to update or remove.
Answer: b
Explanation: MongoDB is a document-oriented database, which means it stores data in JSON-like
documents with dynamic schemas
a)A group of databases b)A single document c)A group of documents d)A type of index
Answer: c
Answer: c
Answer: d
Explanation: MongoDB supports major operating systems like Windows, Linux, and macOS, but it
does not have support for iOS
Answer: c
Answer: d
Explanation: MongoDB does not require Java, Python, or Node.js for its installation.
Answer: a
Explanation: The mongod process is the main daemon process for the MongoDB system and is
responsible for managing the database.
Answer: b
Explanation: The mongo shell is an interactive JavaScript interface to MongoDB, used for database
management and querying.
25. What does 'CRUD' stand for in MongoDB?
Answer: a
Explanation: CRUD operations in MongoDB and other databases refer to the basic operations:
Create, Read, Update, and Delete.
26. Which method is used to insert a single document into a MongoDB collection?
a) db.collection.insertOne() b) db.collection.insert()
c) db.collection.addOne() d) db.collection.create()
Answer: a
Answer: c
Explanation: The find() method in MongoDB returns a cursor to the documents that match the query
criteria.
28. How does MongoDB treat fields that are not specified in the $set part of an update operation?
Answer: b
Explanation: In MongoDB, fields not specified in the $set part of an update operation remain
unchanged.
29. What is the purpose of the $unset operator in an update operation in MongoDB?
Answer: a
Explanation: The $unset operator is used to delete a field from a document in MongoDB.
Answer: c
Explanation: The upsert option in an update operation will insert a new document if no existing
document matches the query criteria.
c) Finds products with a price greater than 100 d)Updates the price of products over 100
Answer: c
Explanation: This query finds all documents in the 'products' collection where the 'price' field is
greater than 100.
32. Which MongoDB command is used to add a new field to an existing document?
Answer: a
Explanation: To add a new field to an existing document, the $set operator is used in an update
command.
Answer: a
Explanation: Without the $set operator, this command replaces the entire document instead of
updating the 'age' field.
Answer: c
Explanation: The _id value is typically a string or ObjectId, so it should be in quotation marks or use
ObjectId().
Answer: b
Explanation: MongoDB's schema approach is flexible and dynamic, allowing varying document
structures within the same collection.