wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mongodb

Total questions: 59

Worksheet time: 33mins

Name
Class
Date
1.

MongoDB is one of the leading NoSQL databases?


a)

False

b)

True


2.

MongoDB indexes use a _______ data structure.

a)


B-tree


b)

All of the mentioned

c)

Hash

d)

Map

3.

Consider a one-to-many relationship observed between a county and the cities in that county. Which of the following are valid ways to represent this one-to-many relationship with the document model in MongoDB?

a)

document having a field to reference the document of its county.

b)


Embed the entities for the cities as an array of sub-documents in the corresponding county document.

c)

Embed all the fields for a city as a subdocument in the corresponding county document.

4.

Which of the following is not part of the first phase of the data modeling methodology?

a)

Identifying the durability of each write operation.


b)


Listing the write operations.

c)


Listing the read operations.

d)

Quantifying each of the operations in terms of latency and frequency

e)

Identifying the relationships between the units of data.

5.

_______ scaling adds more CPU and storage resources to increase capacity.

a)

All of the mentioned

b)


Horizontal

c)


Vertical


d)


Partition

6.

Which of the following pattern is best for static trees that do not change?

a)


Root


b)

Parent


c)

Child

d)

None of the mentioned

7.

The ________ References pattern stores each tree node in a document; in addition to the tree node, the document stores the id of the node’s parent.

a)


Root

b)

Child

c)

None of the mentioned


d)


Parent


8.

What is MongoDB Data Modeling?

a)

Unlike the structured database, where we need to determine table’s schema in advance, MongoDB is very flexible in this area.

b)

Also, common fields in a collection can contain different types of data. This helps in easy mapping.

c)

We know that MongoDB is a document-oriented database or NoSQL database.

d)

MongoDB deals in collections, documents, and fields.

e)

It is a schema-less database or we can say, it has a flexible schema / We can have documents containing different sets of fields or structures in the same collection.

9.

The most frequent operations in a given application are

a)


The read operations

b)

The write operations

c)


The read and write operations

10.

Which of the following pattern is more straightforward to use?

a)

Array of Ancestors


b)

Materialized Paths

c)

Nested Sets

d)

None of the mentioned

11.

Point out the wrong statement.

a)

Decisions that affect how you model data can affect application performance and database capacity

b)


Collections do enforce document structure


c)

Data in MongoDB has a flexible schema

d)

None of the mentioned

12.

From a performance standpoint, when working with a distributed database it's important to consider...

a)


Reading from secondaries only

b)


Routed Queries


c)

Latency


13.

Which of the following is true regarding partial indexes?

a)

Partial indexes support compound indexes.

b)


Partial indexes can be used to reduce the number of keys in an index.


c)


Partial indexes represent a superset of the functionality of sparse indexes.

d)

Partial indexes don't support a uniqueness constraint.

14.

MongoDB can provide high availability with replica sets?

a)

False

b)

True

15.

______________ documents capture relationships between data by storing related data in a single document structure.

a)

Capped

b)


Internal

c)


External

d)

Embedded

16.

Which of the following queries can use an index on the zip field?

a)

db.addresses.find( { zip : 55555 } )

b)

db.addresses.find()

c)

db.addresses.find( { city : "Newark", state : "NJ" } )

17.

Which of the following statements are true about MongoDB documents?

a)

MongoDB documents are stored as BSON documents

b)

MongoDB documents within a collection must have the same fields.

c)

MongoDB documents have a flexible schema

18.

Point out the correct statement.

a)

In practice, the documents in a collection share a different structure

b)

The key challenge in data modeling is balancing the needs of the application, the performance characteristics of the database engine, and the data retrieval patterns

c)

Data in MongoDB has a flexible schema

d)

None of the mentioned

19.

Which one of the following scenarios is the best candidate for use of the Subset Pattern?

a)

The working set does not fit in memory and it is difficult to scale the hardware.

b)

The developers of the system have left and no one understands the application.

c)


The documents are too big.

d)

The system is running out of RAM.

e)

The system is accessing the disk too frequently

20.

The key consideration for the structure of your documents is the decision to embed or to use references

a)

Can not say

b)


TRUE

c)

FALSE

d)


Can be true or false

21.

The ________ Links pattern provides a simple solution to tree storage but requires multiple queries to retrieve subtrees.

a)

Child

b)

Parent

c)

All of the mentioned

d)

Root

22.

Field is a name-value pair in a ___.

a)

Attribute

b)

None of the mentioned above

c)

Table

d)

Document

23.

A document is a set of ___.

a)

Key-value pairs

b)

None of the mentioned above

c)

Activity pair set

d)

Application pairs

24.

The data model available within MongoDB allows us to represent ___.

a)


Hierarchical relationships

b)

None of the mentioned above

c)

Able to handle complex structures

d)


Both All

25.

Point out the correct statement.

a)


One-to-Many Relationships with embedded documents presents a data model that uses embedded documents to describe one-to-one relationships between connected data

b)


All of the mentioned

c)

One-to-One Relationships with embedded documents presents a data model that uses embedded documents to describe one-to-one relationships between connected data

d)


One-to-One Relationships with document references presents a data model that uses embedded documents to describe one-to-one relationships between connected data

26.

Which of the following statements regarding indexes are true?

a)


The _id field is automatically indexed on all collections

b)


Indexes can decrease write, update, and delete performance.

c)

Indexes reduce the number of documents MongoDB needs to examine to satisfy a query.

d)

Indexes are used to increase the speed of our queries.

27.

Which of the following relationship uses references to describe documents between connected data?

a)

One-to-Many Relationships with Embedded Documents

b)

None of the mentioned

c)


One-to-Many Relationships with Document References

d)

One-to-One Relationships with Embedded Documents

28.

Which one of the following scenarios is best suited for the application of the Attribute Pattern?

a)


The system is accessing the disk too frequently.

b)

The documents need strict validation.

c)

The working set does not fit in memory.

d)

Some fields share a number of characteristics, and we want to search across those fields.

e)

The documents are large.

29.

MongoDB stores documents in ___.

a)

Indexes

b)

Collections

c)

None of the mentioned above

d)

Store

30.

MongoDB provides a ________ index type that supports searching for string content in a collection.

a)

string

b)

char

c)

none of the mentioned

d)

text

31.

Failover allows a ________ member to become primary if primary is unavailable.

a)

Hidden

b)

ViewState

c)

Secondary

d)

Primary

32.

MongoDB supports sharding through the configuration of a sharded ______

a)

sets

b)

shapes

c)

clusters

d)

all of the mentioned

33.

A record in MongoDB is a ___.

a)

Application

b)

Table

c)

Document

d)


None of the mentioned above

34.

When should you ever read from secondaries?

a)

To provide reads with lower latency.


b)

To increase performance in a write-heavy system.


c)

When doing ad-hoc queries and analytic jobs.


35.

Which of the following phases are included in our data modeling methodology for MongoDB?

a)

Identify the relationships between models.

b)


Identifying the workload of the system.

c)

Applying schema design patterns.

36.

The create operations in database:

a)

is an operation which involve writing data to the database

b)


All of them

c)

is an operation which change data that already exists in a database

37.

Point out the correct statement.

a)


All of the mentioned

b)

The query to retrieve the parent of a node is slow and complex

c)


The query to retrieve the parent of a node is slow and straightforward

d)


The query to retrieve the parent of a node is fast and straightforward

38.

________ store the relationships between data by including links or references from one document to another.

a)

References

b)

Embedded

c)

Capped

d)

External

39.

Normalized data models describe relationships using ___________ between documents.

a)

none of the mentioned

b)


evaluation

c)

relativeness

d)

references

40.

The _________ References pattern stores each tree node in array the id(s) of the node’s children.

a)


None of the mentioned

b)

Child

c)

Root

d)

Parent

41.

_______ divides the data set and distributes the data over multiple servers, or shards.

a)


All of the mentioned

b)

Sharding

c)

Partition

d)

Vertical

42.

Which of the following statements are true about one-to-zillions relationships?

a)

We must take extra care when writing queries that retrieve data on the zillions side.

b)

The relationship representations that embed documents are not recommended.

c)

It is a special case of the one-to-many relationship.

43.

Which of the following are valid ways to represent a one-to-one relationship with the document model in MongoDB?

a)

Link to a single document in another collection.

b)

Embed the fields in the document.

c)


Embed the fields as a sub-document in the document.

44.

Point out the wrong statement.

a)


Creating indexes that support queries results in greatly increased query performance

b)


None of the mentioned

c)

An index supports a query when the index contains all the fields scanned by the query

d)

The query scans the index and the collection

45.

MongoDB also supports user-defined indexes on multiple fields called ____________

a)


candidate

b)


composite

c)

compound

d)

none of the mentioned

46.

A _______ set is a group of mongod instances that host the same data set.

a)

replica

b)

radii

c)

sorted

d)

copy

47.

Which of the following statements are true about data modeling using MongoDB?

a)

MongoDB will help you iterate on the schema designs of your models throughout your application's lifecycle

b)

MongoDB is schema-less so you should not worry about designing a schema for your models.

c)

MongoDB should only be used for unstructured datasets.

48.

Which of the following is/are true?

a)


Vertical scaling is generally cheaper than horizontal scaling.

b)

Picking a good shard key is one of the most important parts of sharding.

c)

Ordered bulk operations are faster than unordered.

49.

NoSQL is not a ___.

a)


Relational database

b)

Network database

c)


None of the mentioned above

d)


Communication set

50.

Which of the following pattern may provide a suitable solution for storing graphs?

a)


Parent

b)

Root

c)

Child

d)


None of the mentioned

51.

Which other type of index is mostly closely related to text indexes?

a)

Multi-key indexes

b)

Compound indexes

c)

Single-key indexes

d)

Partial indexes

52.

______________ documents capture relationships between data by storing related data in a single document structure.

a)

Embedded

b)

Internal

c)

Capped

d)

External

53.

All other instances, secondaries, apply operations from the _________ so that they have the same data set.

a)

secondary

b)

primary

c)

center

d)

none of the mentioned


54.

The data in MongoDB has a flexible schema?

a)

False

b)

True

55.

Normalized data models describe relationships using ___________ between documents.

a)

references

b)

None of the mentioned

c)

relativeness

d)

evaluation

56.

Given the following schema for the products collection: {id: ObjectId, product_name : String, product_id: String}. And the following index on the products collection: {product_id: 1}. Which of the following queries will use the given index to perform the sorting of the returned documents?

a)


db.products.find({}).sort({ product_id: 1 })

b)

db.products.find({ product_id: '57d7a1' }).sort({ product_id: -1 })


c)

db.products.find({ product_name: 'Soap' }).sort({ product_id: 1 })


d)

db.products.find({}).sort({ product_id: -1 })


e)

db.products.find({ product_name: 'Wax' }).sort({ product_name: 1 })


57.

The embedded data model has the following disadvantages:

a)

We can read and update data in a single database operation.

b)

The maximum size of a MongoDB document is 16MB, which is why care must be taken before embedding documents in other documents.


c)


It can lead to data duplication.


58.

Which of the following is used to avoid repetition of data in MongoDB schema?

a)

Cursor

b)

Collectors

c)

References

d)

DeReferences

59.

Amongst which of the following is / are true about MongoDB?

a)

MongoDB is a cross-platform database

b)

High performance database

c)

Document oriented database

d)

All of the mentioned above