Home
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 14
Choose a topic to test your knowledge and improve your MongoDB skills
1. ______ specifies a geometry in GeoJSON format to geospatial query operators.
$sphere
$geoin
$geometry
All of the mentioned
2. Point out the correct statement.
Both 2dsphere and 2d geospatial indexes support $geoWithin
$geoWithin does not require a geospatial index
The $geoWithin operator does not return sorted results
none of the mentioned
3. _____ returns geospatial objects in proximity to a point on a sphere. Requires a geospatial index.
$near
$nearsphere
$geoIntersect
None of the mentioned
4. ____ specifies a minimum distance to limit the results of $near and $nearSphere queries.
$center
$maxDistance
$minDistance
All of the Mentioned
5. The _________ operator specifies a circle for a $geoWithin query.
$within
$gwithin
$center
All of the Mentioned
6. ____ index must exist on a field holding coordinates before using any of the geospatial query operators.
Unique
Geospatial
Temporal
All of the Mentioned
7. When creating a text index on multiple fields, you can specify the individual fields or you can use wildcard specifier ______
($*)
(**$**)
($**)
none of the mentioned
8. Point out the wrong statement.
In order to drop a text index, use the index name
The default language associated with the indexed data determines the rules to parse word roots and ignore stop words
To allow for text search on all fields with string content, use the wildcard specifier ($$$) to index all fields that contain string content
none of the mentioned
9. The default language for the indexed data is ______
chinese
english
spanish
None of the mentioned
10. If a collection contains documents or embedded documents that are in different languages, include a field named _______ in the documents.
operator
lang
language
All of the mentioned
11. Point out the correct statement.
After 2.4, you can terminate both background index builds and foreground index builds
The specified language in the document overrides the default language for the text index
The text index, like other indexes, should not fall within the index name length limit
None of the mentioned
12. To use a field with a name other than language, include the ________ option when creating the index.
language_over
language_override
langoverride
None of the mentioned
13. The default name for the index consists of each indexed field name concatenated with _______
_char
_textc
_text
All of the Mentioned
14. To avoid creating an index with a name that exceeds the index name length limit, you can pass the _____ option to the db.collection.createIndex() method.
name
lang
number
All of the Mentioned
15. The default weight is ____ for the indexed fields.
1
2
3
4
16. For a ______ index, the weight of an indexed field denotes the significance of the field relative to the other indexed fields in terms of the score.
unique
natural
text
All of the Mentioned
17. _____ operations that use an index often have better performance than those that do not use an index.
Select
Update
Delete
Sort
18. Point out the wrong statement.
The query scans the index and the collection
An index supports a query when the index contains all the fields scanned by the query
Creating indexes that support queries results in greatly increased query performance
None of the mentioned
19. A prefix of a _______ index is a subset that consists of one or more keys at the start of the index key pattern.
unique
primary
compound
None of the mentioned
20. Sort operations that do not use an index will abort when they use _______ megabytes of memory.
16
32
64
All of the Mentioned
21. Point out the correct statement.
If you only ever query on a single key in a given collection, then you need to create just multikey index for that collection
If you sometimes query on only one key and at other times query on that key combined with a second key, then creating a compound index is more efficient than creating a single-key index
The choice between creating compound indexes that support your queries or relying on index intersection is independent of specifics of your system
None of the mentioned
22. An index can support sort operations on a non-prefix subset of the index key pattern using _________ condition.
predicate
selection
equality
None of the mentioned
23. ______ method provides a wrapper around the totalIndexSize output of the collStats (i.e. db.collection.stats()) operation.
db.collection.totalallIndexSize()
db.collection.totalIndexSizeAll()
db.collection.totalIndexSize()
All of the Mentioned
24. Indexes do not have to fit entirely into ______ in all cases.
ROM
RAM
Secondary Storage
None of the mentioned
25. ____ is the ability of a query to narrow results using the index.
Causality
Cardinality
Selectivity
All of the Mentioned
26. ______ query calculates distances using flat (planar) geometry.
$center
$centre
$radii
Sort
27. Point out the wrong statement.
The query scans the index and not the collection
If overall selectivity is high, and if MongoDB must read a number of documents to return results, then some queries may perform faster without indexes
A better strategy, depending on your queries, would be to create a compound index that includes the high-selectivity field and another field
none of the mentioned
28. ______ defines a circle for a geospatial query that uses spherical geometry.
$center
$centre
$radii
$centersphere
29. When used with the $box operator, _________ returns documents based on grid coordinates and does not query for GeoJSON shapes.
$geoNear
$geoWithin
$geoRear
All of the Mentioned
30. Point out the correct statement.
Applications can use $center without having a geospatial index
Before 3.0, a geospatial index must exist on a field holding coordinates before using any of the geospatial query operators
To use $centerSphere, specify an array that contains grid coordinates of the circle’s center point
None of the mentioned
31. Applications can use _________ without having a geospatial index.
$center
$centre
$radii
$centersphere
32. _____ specifies a polygon for a geospatial $geoWithin query on legacy coordinate pairs.
$rect
$polygon
$poly
All of the Mentioned
33. Only the ______ geospatial index supports the $polygon operator.
1dsphere
2d
3d
None of the mentioned
34. _____ returns a document only once for a geospatial query even if the document matches the query multiple times.
$uniqueDocs
$unique
$Docs
All of the Mentioned
35. A _______ set is a group of mongod instances that host the same data set.
copy
sorted
radii
replica
36. Point out the wrong statement.
Replication provides redundancy and increases data availability
Replication allows you to recover from hardware failure and service interruptions
With multiple copies of data on different database servers, replication protects a database from the loss of a single server
None of the mentioned
37. All other instances, secondaries, apply operations from the _________ so that they have the same data set.
center
secondary
primary
none of the mentioned
38. A replica set can have only ________ primary.
One
Two
Three
All of the Mentioned
39. Point out the wrong statement.
In all cases, you can use replication to increase read capacity
Clients have the ability to send read and write operations to different servers
You can also maintain copies in different data centers to increase the locality and availability of data for distributed applications
None of the mentioned
40. To support replication, the primary records all changes to its data sets in its _______
oplog
adlog
log
None of the mentioned
41. You may add an extra mongod instance to a replica set as an ____
arbiter
replicator
additor
All of the mentioned
42. An arbiter will always be an arbiter whereas a primary may step down and become a secondary and a _________ may become the primary during an election.
center
secondary
primary
None of the mentioned
43. When a primary does not communicate with the other members of the set for more than ____ seconds, the replica set will attempt to select another member to become the new primary.
10
20
30
None of the mentioned
44. When a replica set has one and only one primary, reads from that primary provide ______ consistency.
strict
partial
weak
All of the Mentioned
45. How many types of members exist in replica set?
1
2
3
4
46. Point out the wrong statement.
Replication provides scalability and increases data redundancy
A replica set in MongoDB is a group of mongod processes that provide redundancy and high availability
You can also maintain an arbiter as part of a replica set
none of the mentioned
47. Which of the member receives all write operations?
center
secondary
primary
None of the mentioned
48. ____ replicate operations from the primary to maintain an identical data set.
center
secondary
primary
None of the mentioned
49. Point out the wrong statement.
The minimum requirements for a replica set are: A primary, a secondary, and an arbiter
The primary is the only member in the replica set that receives write operations
Most deployments, however, will keep three members that store data: A primary and two secondary members
None of the mentioned
50. ____ play a role in the elections that select a primary if the current primary is unavailable.
Arbiters
Replicators
Loggers
None of the mentioned
Submit