JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
MongoDB interview questions part 17
MongoDB interview questions part 17
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. ________ indexes expire documents after the specified number of seconds has passed since the indexed field value.
A. Hashed
B. Unique
C. Multikey
D. TTL
Show Correct Answer
Correct Answer is :
TTL
2. Point out the correct statement :
A. If you build a TTL index in the foreground, MongoDB does not remove expired documents as soon as the index finishes building
B. The TTL index does guarantee that expired data will be deleted immediately upon expiration
C. Duration of the removal operation depends on the workload of your mongod instance
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Duration of the removal operation depends on the workload of your mongod instance
3. When the TTL thread is active, you will see _______ operations in the output of db.currentOp()
A. delete
B. update
C. insert
D. none of the mentioned
Show Correct Answer
Correct Answer is :
delete
4. The background task that removes expired documents runs every ________ seconds.
A. 15
B. 45
C. 60
D. 120
Show Correct Answer
Correct Answer is :
60
5. Point out the wrong statement :
A. The unique constraint applies to separate documents in the collection
B. Unique index prevents separate documents from having the same value for the indexed key
C. Index does prevent a document from having multiple elements or embedded documents in an indexed array from having the same value
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Index does prevent a document from having multiple elements or embedded documents in an indexed array from having the same value
6. On replica sets, the TTL background thread only deletes documents on :
A. primary
B. secondary
C. upadte
D. none of the mentioned
Show Correct Answer
Correct Answer is :
primary
7. You can combine the ________ constraint with the sparse index to filter these null values from the unique index and avoid the error.
A. Hashed
B. Unique
C. sparse
D. compound
Show Correct Answer
Correct Answer is :
sparse
8. Which of the following method is to verify whether MongoDB used index intersection ?
A. explain()
B. analyze()
C. intersect()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
explain()
9. You may not specify a unique constraint on a ______ index.
A. Hashed
B. Unique
C. Sparse
D. Compound
Show Correct Answer
Correct Answer is :
Hashed
10. Which of the following indexes are always sparse ?
A. 2dsphere
B. 2d
C. geoHaystack
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
11. To support ________ based sharding, MongoDB provides a hashed index type,
A. primary
B. root
C. hash
D. all of the mentioned
Show Correct Answer
Correct Answer is :
hash
12. Point out the correct statement :
A. Whether the use of a compound index or the use of an index intersection is more efficient depends on the particular query and the system
B. Certain restrictions apply to indexes, such as the length of the index keys or the number of indexes per collection
C. For queries that specify compound query conditions, if one index can fulfill a part of a query condition, and another index can fulfill another part of the query condition, then MongoDB can use the intersection of the two indexes to fulfill the query
D. None of the mentioned
Show Correct Answer
Correct Answer is :
None of the mentioned
13. ________ index type, which indexes the hash of the value of a field.
A. Hashed
B. Unique
C. Multikey
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Hashed
14. The _________ property for an index causes MongoDB to reject duplicate values for the indexed field.
A. Hashed
B. Unique
C. Multikey
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Multikey
15. Point out the wrong statement :
A. TTL index is ideal for certain types of information like machine generated event data, logs, and session information that only need to persist in a database for a finite amount of time
B. You cannot combine the sparse index option with the unique index option
C. TTL indexes are special indexes that MongoDB can use to automatically remove documents from a collection after a certain amount of time
D. None of the mentioned
Show Correct Answer
Correct Answer is :
You cannot combine the sparse index option with the unique index option
16. The ______ property of an index ensures that the index only contain entries for documents that have the indexed field.
A. Hashed
B. Unique
C. Sparse
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Sparse
17. MongoDB can use the _________ of indexes to fulfill queries.
A. union
B. intersection
C. projection
D. none of the mentioned
Show Correct Answer
Correct Answer is :
intersection
18. Which of the following method is to verify whether MongoDB used index intersection ?
A. explain()
B. analyze()
C. intersect()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
explain()
19. An index prefix is a subset of a ______ index, consisting of one or more keys starting from the beginning of the index.
A. Hashed
B. Unique
C. Sparse
D. Compound
Show Correct Answer
Correct Answer is :
Compound
20. Index __________ does not eliminate the need for creating compound indexes.
A. union
B. addition
C. intersection
D. all of the mentioned
Show Correct Answer
Correct Answer is :
intersection
Similar Interview Questions
Search for latest jobs
Find Jobs