Big Data, MongoDB

3 Mins Read

Sample Questions for MongoDB Certified DBA (C100DBA) exam – Part II

Here are some more sample questions for C100DBA: MongoDB Certified DBA Associate Exam.

Please give them a try and the answers are at the end of this blog post.

If you have not yet attempted Part I of sample questions – they are available here.

Section 1: Philosophy & Features:

1. Which of the following are valid json documents? Select all that apply.

a. {“name”:”Fred Flintstone”;”occupation”:”Miner”;”wife”:”Wilma”}

b. {}

c. {“city”:”New York”, “population”, 7999034, boros:{“queens”, “manhattan”, “staten island”, “the bronx”, “brooklyn”}}

d. {“a”:1, “b”:{“b”:1, “c”:”foo”, “d”:”bar”, “e”:[1,2,4]}}

Section 2: CRUD Operations:

1. Which of the following operators is used to updated a document partially?

a. $update

b. $set

c. $project

d. $modify

Section 3: Aggregation Framework:

Questions 1 to 3

Below is a sample document of “orders” collection

{

cust_id: “abc123”,

ord_date: ISODate(“2012-11-02T17:04:11.102Z”),

status: ‘A’,

price: 50,

items: [ { sku: “xxx”, qty: 25, price: 1 },

{ sku: “yyy”, qty: 25, price: 1 } ]

}

Select operators for the below query to determine the sum of “qty” fields associated with the orders for each “cust_id”.

db.orders.aggregate( [

{ $OPR1: “$items” },

{

$OPR2: {

_id: “$cust_id”,

qty: { $OPR3: “$items.qty” }

}

}

] )

1. OPR1 is

a. $group

b. $project

c. $unwind

d. $sum

2. OPR2 is

a. $group

b. $sort

c. $limit

d. $sum

3. OPR3 is

a. $match

b. $project

c. $skip

d. $sum

Section 4: Indexing:

1. Which of the following index would be optimum for the query? Select all valid.

db.test.find( { a : 5, c : 2 })

a. db.test.ensureIndex( { a: 1, b :1, c:1, d:1})

b. db.test.ensureIndex( { a : 1, c: 1, d: 1, b : 1})

c. db.test.ensureIndex( { a :1, c:1})

d. db.test.ensureIndex( { c:1, a: 1})

Section 5: Replication:

1. What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?

a. 3

b. 4

c. 5

d. None of the above

Section 6: Sharding:

1. Write the command(s) are correct to enable sharding on a database “testdb” and shard a collection “testCollection” with _id as shard key.

Section 7: Server & Application Administration:

1. To add a new user and enable authentication in MongoDB, which of the following steps need be executed?

a. update users collection and restart mongodb

b. update users collection and restart mongodb with –auth option

c. update users collection and run db.enableAuthentication()

d. All of the above

Section 8: Backup & Restore:

1. Which of the following needs to be performed prior to initiate backup on a sharded cluster?

a. db.stopServer()

b. db.stopBalancer()

c. sh.stopServer()

d. sh.stopBalancer()

Answers

Section 1: Philosophy & Features:

1. b,d

Section 2: CRUD Operations

1. b

Section 3: Aggregation Framework

1. c

2. a

3. d

Section 4: Indexing

1. b,c

Section 5: Replication

1. b

Section:6 Sharding

1. sh.enableSharding(“testdb”) & sh.shardCollection(“testdb.testCollection”, {_id : 1 }, true )

Section 7: Server & Application Administration

1. b

Section 8: Backup & Restore

1. d

I will also be conducting a bootcamp for this certification in Bangalore and online. If you are interested to join, please click here and fill out the form.

Also more sample questions are coming, so keep checking.. Please share if you liked the post by using the social buttons below.

Disclaimer: These questions are NOT what were in my certification exam. I personally or CloudThat do not have any official tie-up with MongoDB regarding the certification or the kind of questions asked. These are my best guesses for the kind of questions to expect, given my experience with MongoDB in general and with the examination.

WRITTEN BY CloudThat

SHARE

Comments

  1. RAJALAKSHMI

    Jan 16, 2015

    Reply

    Hi,

    Totally how many questions are there for the exam?

    • Sankeerth Reddy

      Feb 1, 2017

      Reply

      when I took up, there were 60 questions and It is dynamic.

      • Gajendra

        Jun 6, 2018

        Reply

        Do you know passing score for this exam

        • Sankeerth Reddy

          Sep 3, 2018

          Reply

          Gajendra, MongoDB hasnt published the passing criteria. SO, even I cannot help you with it

  2. jedimaster91

    Jul 21, 2014

    Reply

    Section 4: Indexing, answer should be B, C, D.

    • Alex

      Apr 17, 2017

      Reply

      I agree – B C D is correct. Now if there is a sort ( { a : 1, b : 1 } ), then answer is B, C.

  3. Sankeerth Reddy

    May 14, 2014

    Reply

    Thank you. Yes you are correct, I have updated both the answer accordingly.

    Thank You
    Sankeerth

  4. jedimaster91

    May 12, 2014

    Reply

    Answer for Section 7, Q1 is B.

  5. jedimaster91

    May 12, 2014

    Reply

    Answer for Section 1, Q1. are B and D.

  6. Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!