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

April 21, 2014 | Comments(8) |

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()


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.

8 Responses to “Sample Questions for MongoDB Certified DBA (C100DBA) exam – Part II”

  1. Sankeerth Reddy Sankeerth Reddy

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

    Thank You

  2. Pirate

    Are these question made by you ? or did you take the exam and sharing similar type of question ?

    • Sankeerth Reddy Sankeerth Reddy

      These were questions made by me based on my experience taking up the exam.


Leave a Reply