

MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Mongodb knowledge and support exam preparation. Choose a topic below to get started.
1. |
TO_SUPPRESS_THE__ID_FIELD_FROM_THE_RESULT_SET,_SPECIFY___________IN_THE_PROJECTION_DOCUMENT.?$ |
A. | _id: 1 |
B. | _id: 0 |
C. | _id: it |
D. | None of the mentioned |
Answer» C. _id: it | |
2. |
Which_of_the_following_is_not_a_projection_operator_?$ |
A. | $slice |
B. | $elemMatch |
C. | $ |
D. | None of the mentioned |
Answer» E. | |
3. |
Which of the following functionality is used for aggregation framework ? |
A. | $match |
B. | $project |
C. | $projectmatch |
D. | All of the mentioned |
Answer» C. $projectmatch | |
4. |
Which of the following query selects documents in the records collection that match the condition { “user_id”: { $lt: 42 } } ?$ |
A. | db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
B. | db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
C. | db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 1 } ) |
D. | db.records.select( { “user_id”: { $lt: 42 } }, { “history”: 0 } ) |
Answer» C. db.records.findOne( { ‚Äö√Ñ√∂‚àö√ë‚àö‚à´user_id‚Äö√Ñ√∂‚àö√ë‚àöœÄ: { $lt: 42 } }, { ‚Äö√Ñ√∂‚àö√ë‚àö‚à´history‚Äö√Ñ√∂‚àö√ë‚àöœÄ: 1 } ) | |
5. |
Which of the following is second argument to projection ? |
A. | findOne() |
B. | findOne1() |
C. | selectOne() |
D. | find() |
Answer» E. | |
6. |
Which of the following method returns one document? |
A. | findOne() |
B. | findOne1() |
C. | selectOne() |
D. | all of the mentioned |
Answer» B. findOne1() | |
7. |
In aggregation pipeline, the _______ pipeline stage provides access to MongoDB queries. |
A. | $catch |
B. | $match |
C. | $batch |
D. | All of the mentioned |
Answer» C. $batch | |
8. |
The order of documents returned by a query is not defined unless you specify a ______ |
A. | sortfind() |
B. | sortelse() |
C. | sort() |
D. | none of the mentioned |
Answer» D. none of the mentioned | |