MongoDB MCQ Quiz Hub

MongoDB Mcq Question Set 13

Choose a topic to test your knowledge and improve your MongoDB skills

Point out the correct statement.





✅ Correct Answer: 2

MongoDB supports the creation of user-defined ascending/descending indexes on a ______ field of a document.





✅ Correct Answer: 1

The ______ index is unique and prevents clients from inserting two documents with the same value for the _id field.





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 3

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





✅ Correct Answer: 1

MongoDB uses ______ indexes to index the content stored in arrays.





✅ Correct Answer: 2

______ indexes use spherical geometry to return results.





✅ Correct Answer: 2

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





✅ Correct Answer: 2

_____ indexes uses planar geometry when returning results.





✅ Correct Answer: 1

To support ________ based sharding, MongoDB provides a hashed index type.





✅ Correct Answer: 3

Point out the correct statement.





✅ Correct Answer: 4

_______ index type, which indexes the hash of the value of a field.





✅ Correct Answer: 1

The _________ property for an index causes MongoDB to reject duplicate values for the indexed field.





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 2

The ______ property of an index ensures that the index only contain entries for documents that have the indexed field.





✅ Correct Answer: 3

MongoDB can use the _________ of indexes to fulfill queries.





✅ Correct Answer: 2

Which of the following method is to verify whether MongoDB used index intersection?





✅ Correct Answer: 1

An index prefix is a subset of a ______ index, consisting of one or more keys starting from the beginning of the index.





✅ Correct Answer: 4

Index __________ does not eliminate the need for creating compound indexes.





✅ Correct Answer: 3

Before version _______ capped collections did not have an _id field.





✅ Correct Answer: 4

Point out the wrong statement.





✅ Correct Answer: 3

For a _____ multikey index, each indexed document can have at most one indexed field whose value is an array.





✅ Correct Answer: 4

Which of the following indexes cannot be multikey?





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 3

To calculate geometry over an Earth-like sphere, store your location data on a spherical surface and use _____ index.





✅ Correct Answer: 1

_____ indexes can be constructed over arrays that hold both scalar values (e.g. strings, numbers) and nested documents.





✅ Correct Answer: 3

The coordinate reference system for GeoJSON uses the _____ datum.





✅ Correct Answer: 2

Which of the following is used to calculate distances on a Euclidean plane?





✅ Correct Answer: 2

Queries on ________ objects always calculate on a sphere.





✅ Correct Answer: 2

Which of the following GeoJSON object is not supported in MongoDB?





✅ Correct Answer: 4

Point out the wrong statement.





✅ Correct Answer: 2

MongoDB supports spherical surface calculations on legacy coordinate pairs using a _______ index.





✅ Correct Answer: 1

Inclusion queries use the _________ operator in MongoDB.





✅ Correct Answer: 3

Point out the correct statement.





✅ Correct Answer: 2

The $geoWithin operator uses the _______ operator to specify the GeoJSON object.





✅ Correct Answer: 3

If the specified polygon is _______ than a single hemisphere, the behavior of $geoWithin with the MongoDB CRS is the same as with the default CRS.





✅ Correct Answer: 1

To query with a single-ringed GeoJSON polygon whose area is greater than a single hemisphere, the $geometry expression must specify the custom MongoDB ________





✅ Correct Answer: 1

$geoWithin replaces _______ in MongoDB 2.4.





✅ Correct Answer: 3

When used with the _____ operator, $geoWithin returns documents based on grid coordinates and does not query for GeoJSON shapes.





✅ Correct Answer: 1

_____ indexes expire documents after the specified number of seconds has passed since the indexed field value.





✅ Correct Answer: 4

Point out the correct statement.





✅ Correct Answer: 3

The background task that removes expired documents runs every ________ seconds.





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 3

On replica sets, the TTL background thread only deletes documents on _____





✅ Correct Answer: 1

You can combine the ________ constraint with the sparse index to filter these null values from the unique index and avoid the error.





✅ Correct Answer: 3

You may not specify a unique constraint on a ______ index.





✅ Correct Answer: 1

Which of the following indexes are always sparse?





✅ Correct Answer: 4

To modify an existing index, you cannot just re-issue the _________ method with the updated specification of the index.





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 3

If you need to rebuild indexes for a collection you can use the _________ method to rebuild all indexes on a collection in a single operation.





✅ Correct Answer: 1

To terminate an ongoing index build, use the __________ method in the mongo shell.





✅ Correct Answer: 2

Point out the correct statement.





✅ Correct Answer: 3

In the mongo shell, you can use the ______ method to return a list of the indexes on a collection.





✅ Correct Answer: 3

____ views partial execution statistics collected during plan selection.





✅ Correct Answer: 2

The __________ operator constrains the results of a geospatial $near or $nearSphere query to the specified distance.





✅ Correct Answer: 2

To force MongoDB to use a particular index for a db.collection.________ operation, specify the index with the hint() method.





✅ Correct Answer: 2

Specify the ______ operator to the hint() method to prevent MongoDB from using any index.





✅ Correct Answer: 2

______ selects geometries that intersect with a GeoJSON geometry.





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 4

______ returns geospatial objects in proximity to a point.





✅ Correct Answer: 1