Professional Documents
Culture Documents
UNit 3 QB
UNit 3 QB
Year / Semester: II / IV
MODULE III
Bloom's Taxonomy
S. No Question Cognizance Level
Level
1. What is MongoDB and explain how is MongoDB different from traditional relational databases? K1 Remember
2. Explain the difference between MongoDB and MySQL. K2 Understand
3. How do you start and stop MongoDB? K1 Remember
4. What is indexing in MongoDB, and why is it important? K1 Remember
5. What is the difference between insert(), insertOne(), and insertMany()? K1 Remember
6. How do you query documents in MongoDB? K1 Remember
7. How do you optimize query performance in MongoDB? K1 Remember
8. Explain the difference between deleteOne() and deleteMany(). K2 Understand
9. What are the differences between MongoDB and other NoSQL databases like Cassandra and CouchDB? K1 Remember
10. What are some common issues faced in MongoDB, and how do you troubleshoot them? K2 Understand
You are designing a blogging platform where each user can have multiple posts, and each post can have
11. K2 Understand
multiple comments. How would you model this data in MongoDB?
12. Explain the aggregation framework in MongoDB K2 Understand
13. How do you handle large datasets in MongoDB? K1 Remember
How do you create an index in MongoDB? What are the types of indexes in MongoDB?
14. K1 Remember
15. A critical collection in your MongoDB database was accidentally deleted. How would you recover the data? K2 Understand
You need to delete all documents from a collection that are older than a specific date. How would you achieve
16. K2 Understand
this?
17. What is the difference between updateOne(), updateMany(), and replaceOne()? K2 Understand
18. How do you use the $lookup operator for joins in MongoDB? K1 Remember
19. What does the $limit stage do in an aggregation pipeline? K2 Understand
20. What are the key differences between the find() method and the aggregation framework? K1 Remember
Bloom's Taxonomy
S.No Question Cognizance Level
Level
You are building a user registration system where each user needs to be inserted into the users collection.
Each user document should contain the fields: username, email, password, and createdAt.
1. K2 Understand
i)How would you structure the insert query to add a new user?
ii)How would you ensure that the createdAt field is automatically set to the current date and time?
You need to insert a new document, but you want to avoid inserting a document if one with the same
username already exists. If it exists, you want to update the existing document instead.
2. K3 Apply
i)How would you perform this operation using an upsert?
ii)Write the MongoDB query to achieve this.
Sheeba is developing a library management system. Create a MongoDB database named "LibraryDB" with
3. collections for "books", "members", and "loans". Define schemas using Mongoose, write scripts to insert, K3 Apply
update, and delete records, and create queries to find overdue books and top borrowers.
In a blogging application, you need to insert a new post that includes the author ID, content, timestamp, and
an array of tags.
4. K3 Apply
i)Write the query to insert the new post into the posts collection.
Ii)How would you structure the document to include tags as an embedded array?
You need to find a task by its taskId and retrieve all its comments from the tasks collection.
5. i)Write the query to find the task and include comments in the results. K3 Apply
ii)How would you handle the case where the task does not exist?
Discuss in detail about MongoDB Update methods and apply each method in a scenario in Library Apply
7. K3
Management System.
You need to update the stock quantity for multiple products in the products collection based on a given
category. Apply
8. K3
i)Write the query to update the stock for all products in that category.
ii)What considerations should you take into account for updating multiple documents?