Search test library by skills or roles
⌘ K

Adaface Sample MongoDB Questions

Here are some sample MongoDB questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Medium

Index key order
Solve
                                    Consider the following indexes on "musk" collection and the written queries. Select the queries that will use an index:
                                    
 image
                                    A) db.musk.find( { title : "SpaceX" } )
            B) db.musk.find( { _id : 22, date: ISODate("2020-01-01" } ) 
            C) db.musk.find( { date: ISODate("2020-01-01"), biz : "ElonSpaceX" } )
            D) db.musk.find( { contact : "111-111-1111"), info : "000-000-0000" } )
                                    

Options:

  • A B
  • A C
  • A D
  • B C
  • B D
  • C D
  • A B C
  • A C D
  • A B D
  • B C D

Medium

Indexing Sorting
Solve
                                    Given the following sample document in Mongodb:
            
            { x: 5, y: 3, z: 2, w: 1 }
                                    
                                    If the collection name is 'adaface' with a compound index { x: 1, y: 1, z: 1, w: 1}, which of the following queries will not use in-memory sorting?
                                    
 image

Options:

  • A B
  • A C
  • A D
  • B C
  • B D
  • C D

Medium

Unwind
Solve
                                    Given the following movies document in MongoDB, What will be the output of the query:
                                    
 image

Options:

  • Arranges the genres in ascending order
  • Arranges the genres in descending order
  • Returns three separate documents for three genres
  • Returns one document but converts the genres array in an object

Medium

Shard chunk
Solve
                                    Read the following chunk and pick the correct statements that apply:
                                    
 image
                                    A: The shard key defined for "sessions" collection is {userId: 1, sessionId: 1}
            B: All documents in chunk "test.sessions-abc-yxz" are located in shard "sh-1"
            C: Documents with fields {"userId": 10, "sessionId": "AB01" } are located part of chunk "test.sessions-abc-yxz"
                                    

Options:

  • A
  • B
  • C
  • A B
  • A C
  • B C
  • A B C
🧐 Question🔧 Skill

Medium

Index key order
2 mins
MongoDB
Solve

Medium

Indexing Sorting
2 mins
MongoDB
Solve

Medium

Unwind
2 mins
MongoDB
Solve

Medium

Shard chunk
3 mins
MongoDB
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
Index key order
MongoDB
Medium2 minsSolve
Indexing Sorting
MongoDB
Medium2 minsSolve
Unwind
MongoDB
Medium2 minsSolve
Shard chunk
MongoDB
Medium3 minsSolve

Adaface questions are trusted by enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great default library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
Join 1200+ companies in 75+ countries.
Prova det mest kandidatvänliga utvärderingsverktyget idag.
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
chatta med oss
40 min tests.
No trick questions.
Accurate shortlisting.