wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MongoDB Quiz

Total questions: 25

Worksheet time: 20mins

Name
Class
Date
1.

A ___?___ is a grouping of MongoDB documents and is the equivalent of a table in relational databases.

(a)  

2.

The documents in a multiple collection in MongoDb need to have the same set of fields and the data type for a field can differ across documents within a collection.

a)

True

b)

False

3.

What is the primary method used for connecting tables in a Nosql database?

a)

embedding

b)

referencing

c)

N/A

4.

Which MongoDB query operator allows you to update specific elements in an embedded array?

a)

$push

b)

$addToSet

c)

$elemMatch

d)

$set

5.

In a school project, how can you represent a one-to-many relationship using embedding?

a)

Storing foreign keys

b)

Storing an array of sub-documents

c)

Using $lookup aggregation

d)

Creating separate collections

6.

Why did Ethan choose to reference instead of embedding in MongoDB?

a)

To simplify data retrieval

b)

To optimize query performance

c)

To handle one-to-many relationships

d)

To avoid data duplication and inconsistency

7.

What is the main benefit of using embedding in MongoDB?

a)

Reduced data duplication

b)

Easier to update related data

c)

Improved query performance for complex joins

d)

All of the above

8.

When should you consider using referencing instead of embedding in MongoDB?

a)

For one-to-one relationships

b)

When query performance is critical

c)

When data consistency is a top priority

d)

For denormalized data structures

9.

How does embedding in a school database affect the storage size of student records?

a)

Increases the size significantly

b)

Decreases the size significantly

c)

Has no impact on the size

d)

Depends on the number of courses taken by each student

10.

In a school project, Evelyn is tasked with capturing relationships between different subjects by storing related information in a single document structure. What method should Evelyn use for this purpose?

(a)  

11.

In a school setting, how can we store the relationships between students and their grades by including links or references from one record to another

(a)  

12.

Embedded data models make it possible to update related data in a single atomic write operation.

a)

True

b)

False

13.

How does using separate collections in MongoDB impact the scalability of a school database?

a)

Improves data retrieval speed

b)

Reduces data redundancy

c)

Enhances data consistency

d)

May lead to performance issues

14.

In MongoDB, it is always recommended to embed one-to-many relationships within a single document.

a)

True

b)

False

15.

In MongoDB, denormalization is a common practice to optimize read performance at the cost of increased storage.

a)

True

b)

False

16.

MongoDB supports ACID transactions for multi-document operations across multiple collections.

a)

True

b)

False

17.

Using smaller documents containing more frequently-accessed data enlarges the overall size of the working set

a)

True

b)

False

18.

With MongoDB, you may embed related data in a single structure or document. These schema are generally known as “normalized”

a)

True

b)

False

19.

Documents in MongoDB must be smaller than the maximum BSON document size, which is 16 kilobytes

a)

True

b)

False

20.

When using references, the growth of the relationships determine where to store the reference.

a)

True

b)

False

21.

The ___?___ field in MongoDB is a 12-byte unique identifier for documents within a collection.

(a)  

22.

Embedding one-to-many relationships directly within a document is called ___?___.

(a)  

23.

In MongoDB, the $push operator is used to ___?___ new items to an array field in a document.

(a)  

24.

Normalized data models describe relationships using ___?___ between documents.

(a)  

25.

What is the main benefit of denormalized data structures in a MongoDB database?

a)

Improved data consistency

b)

Reduced storage size

c)

Enhanced query performance

d)

Facilitates complex join operations