0% found this document useful (0 votes)
20 views2 pages

MFD Assignment 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

MFD Assignment 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BHAGWAN MAHAVIR UNIVERSITY

FACULTY OF ENGINEERING
COMPUTER/IT ENGINEERING DEPARTMENT
5TH SEM
ASSIGNMENTS

Modern Full Stack Developer – Theory (2010207505)

Unit-5: Database Programming with MongoDB


Submission Date - 17/12/24

Que 1: Answer the following Questions. (2 Marks)

1.​ Explain the difference between SQL and NoSQL databases.


2.​ Write a note on MongoDB.
3.​ Explain the basic concepts of MongoDB. Include definitions for
4.​ Document, Collection, and Database.
5.​ What is a MongoDB document?
6.​ What is the purpose of the _id field in MongoDB?
7.​ What is the role of Mongoose in MongoDB development?

Que 2: Answer the following Questions. (4 Marks)

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.

Que 3: Answer the following Questions. (6 Marks)

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?

You might also like