Unit 3: Schema Design and Data Modeling - Subjective Questions

CSE494 — Intelligent Nosql Databases • Practice Questions with Detailed Answers

20 questions

1

Define the schema-less nature of MongoDB. How does it differ from the fixed-schema approach used by relational databases?

2

Explain the advantages and disadvantages of MongoDB's flexible document schema.

3

Distinguish between embedding and referencing in MongoDB data modeling. Include suitable examples and use cases.

4

What factors should be considered when choosing between embedding and referencing in MongoDB?

5

Describe how a one-to-one relationship can be modeled in MongoDB using both embedding and referencing.

6

Explain the different ways of modeling a one-to-many relationship in MongoDB. Illustrate your answer with an author-and-books example.

7

Why should an unbounded one-to-many relationship generally not be represented as an ever-growing embedded array?

8

Describe how a many-to-many relationship can be modeled in MongoDB. Use students and courses as an example.

9

Compare a many-to-many model based on arrays of references with one based on an association collection.

10

Explain the principle of designing a MongoDB schema according to application access patterns.

11

Discuss important data modeling best practices for MongoDB.

12

What is denormalization in MongoDB? Explain its benefits and risks.

13

Design a MongoDB data model for an e-commerce order system containing customers, products, orders, delivery addresses, and order items. Justify which data should be embedded and which should be referenced.

14

Propose a MongoDB schema for a blogging platform with users, posts, comments, and tags. Explain how expected data growth affects the design.

15

What are MongoDB schema validation rules? Explain how $jsonSchema can be used to validate documents.

16

Differentiate between validationLevel and validationAction in MongoDB.

17

Explain how MongoDB indexes can be used to enforce constraints. What limitations remain compared with relational database constraints?

18

Describe a strategy for schema evolution and migration in a MongoDB application.

19

A social networking application must store users and millions of follower relationships. Evaluate possible MongoDB models and recommend an appropriate design.

20

A library application embeds every loan ever made inside each member document. Identify the problems with this model and redesign it using MongoDB data modeling principles.