MFD Assignment 5.Docx
MFD Assignment 5.Docx
FACULTY OF ENGINEERING
COMPUTER/IT ENGINEERING DEPARTMENT
5TH SEM
ASSIGNMENTS
1. Describe the advantages of using MongoDB over traditional relational databases.
2. What is "callback hell" in JavaScript, and how does it relate to MongoDB operations?
Provide an example.
3. Explain the CRUD operations in MongoDB and give an example of each operation using
the MongoDB shell.
4. Explain the concept of Promises in JavaScript. How do Promises improve the
management of asynchronous code in MongoDB? Provide a simple example.
1. Create a simple Node.js application that uses Mongoose to connect to a MongoDB
database, defines a schema, and performs CRUD operations (Create, Read, Update,
Delete) on a collection.
2. Explain in detail the process of setting up Mongoose in a Node.js application. Include the
steps for creating a schema, defining models, and performing CRUD operations. Provide
an example where a "User" schema is created and basic CRUD operations are
performed.
3. Discuss the importance of indexes in MongoDB. How does MongoDB handle indexing,
and how would you create an index on a specific field in MongoDB?