Unit 2: MongoDB Basics and CRUD Operations - Subjective Questions

CSE494 — Intelligent Nosql Databases • Practice Questions with Detailed Answers

20 questions

1

Define MongoDB and explain its major characteristics as a NoSQL database.

2

Explain the concepts of databases, collections, and documents in MongoDB with a suitable example.

3

What is a MongoDB document? Describe its structure and explain the role of the _id field.

4

Explain BSON and compare it with JSON. Why does MongoDB use BSON internally?

5

Describe the important BSON data types supported by MongoDB and give examples of their use.

6

Explain how to create and switch to a database in MongoDB. What happens if the database does not yet exist?

7

Describe the methods for creating collections in MongoDB. Distinguish between implicit and explicit collection creation.

8

Explain how to drop a collection and a database in MongoDB. Discuss the precautions that should be taken before performing these operations.

9

Explain the CRUD operations in MongoDB with representative commands.

10

Differentiate between insertOne() and insertMany() in MongoDB. Explain the advantages of bulk insertion.

11

Explain MongoDB query operators and update operators with suitable examples.

12

Compare embedded documents and references in MongoDB data modeling. State the situations in which each approach is appropriate.

13

Describe the principles of data modeling in MongoDB and explain why application access patterns are important.

14

Explain normalization and denormalization in MongoDB. Compare their benefits and limitations.

15

What is an index in MongoDB? Explain how indexes improve query performance and describe their costs.

16

Explain the different types of indexes commonly used in MongoDB.

17

Explain compound indexes in MongoDB and discuss the importance of field order in a compound index.

18

What is query optimization in MongoDB? Explain how the explain() method helps analyze a query.

19

Explain projection, sorting, limiting, and skipping in MongoDB queries with examples.

20

Explain upsert operations in MongoDB. How does an upsert differ from a normal update?