How to pass MongoDB C100DBA (MongoDB Certified DBA Associate Exam)

Arek Borucki
9 min readJul 18, 2020

I haven’t seen many blogs about C100DBA certification from the NoSQL MongoDB database, so I decided to share my tips.

My name is Arkadiusz Borucki, I work since years with MongoDB and Ops Manager deployed at huge scale in travel industry, maybe you already know me from some MongoDB conferences or meetups.
I want to tell you my certification story and I would like to advise you to also try to pass MongoDB certification exams! During study you will discover many MongoDB tips and hints which you maybe didn’t know before !

Motivation: When I gained good professional experience with MongoDB databases, I wanted to prove to myself that I know MongoDB well enough and I decided to organize my knowledge and pass the C100DBA certification exam. Additional motivation for learning should be bright future of MongoDB and NoSQL databases — according to Morgan Stanley research they will own the next generation of apps which means that knowledge of their scope will be desired. If you also try to pass exam will definitely become a better expert because the study material is extensive and includes all areas of the database and the most important from the point of view of the exam is to understand it.

C100DBA exam

You will have 90 minutes for 60 single and multi choice questions. Questions are not easy and sometimes tricky, when I answered all questions I had just 10 minutes for double checking everything. I submitted my final answers 2 minutes before deadline. Exam contains all key areas of the MongoDB database (Philosophy & Features, CRUD, Indexing, Replication, Sharding, Application Administration, Server Administration) and you need to collect the right number of points to pass. Results are available within a week after the exam is closed. I was waiting 3 days for results — they arrive via e-mail.

Threshold for passing

Score Required to Pass is 490 points out of 600. It looks like you can have a maximum of 10 points for one question and semi-correct answers also count and you get some points for them. There is no penalty for incorrect answers.

Study

Fortunately MongoDB provides fantastic materials for study that allow you to prepare well. On MongoDB university website you can find exact tips on how to study for the exam. I think those materials are sufficient to pass the exam, you don’t need to searching for any external learning resources. Some questions on the real exam are very similar to questions from MongoDB online courses quizzes. It is definitely worth taking these online courses and paying attention to the quizzes and all hints included there. I took notes of the most important points and repeated them before the exam. In my opinion these courses are critical from the point of view of the exam: M001, M103, M201, M310.
Another good resources for preparation are Practice Exams — these exams simulate a real exam and some questions were similar to questions I had on real one. I would recommend practice a lot with those. Build confidence by familiarizing yourself with the subject areas and format of the certification exam. After completing your practice exam, identify knowledge gaps by taking a look at your incorrect answers. Each answer has detailed explanations with links to relevant resources. It is good idea to do practice exams few times as questions are a bit different every time you start exam. More practice = better result on end exam.
MongoDB Documentation it’s also a great place to organize your knowledge and explain anything that may not be clear to you. I was reading documentation few days before my exam, documentation reading step was last step in my preparation.

Key exam areas

  1. Indexes. I think this area is the most important one (it is also very useful when you work day by day with MongoDB). MongoDB offers a broad range of index types and features with language-specific sort orders to support complex access patterns to your data and on exam you will have many different questions related to different type of indexes and you will have to understand the differences between the various variations.
    a. Compound Indexes — where a single index structure holds references to multiple fields — pay attention to order of the fields listed in a compound index. You will have exam questions if examples of queries can use compound index or not. Compound index supports queries that match on all the index fields, can also support queries that match on the prefix of the index fields.
    b.
    Sort with compound index - If the sort keys correspond to the index keys or an index prefix, MongoDB can use the index to sort the query results. A prefix of a compound index is a subset that consists of one or more keys at the start of the index key pattern. You will have few questions if given query can use compound index for sorting or for filtering and sorting.
    c. Multikey Indexes - To index a field that holds an array value, MongoDB creates an index key for each element in the array. You will be ask how to create index of array and about limitations of multikey index. Remember that you cannot create a compound multikey index if more than one to-be-indexed field of a document is an array.
    d. Partial Indexes - Partial indexes only index the documents in a collection that meet a specified filter expression. It reduce performance costs for index creation and maintenance. Exam question will ask whether the query will take advantage of partial indexes. You can check it via partialFilterExpression option.
    e. Covered query - is a query that can be satisfied entirely using an index and does not have to examine any documents. You will have to distinguish whether the query is covered or not.
    f. Sort with index - sort operations can obtain the sort order by retrieving documents based on the ordering in an index. If the query planner cannot obtain the sort order from an index, it will sort the results in memory. You will have to distinguish whether the query use index for sort or not. Make sure you will read about ascending (1) or descending (-1) sort order in context of compound index.
    g. Index and Collation - you will need to judge if query operation, which specifies the same collation as the index, can use the index.
    h. Query Plans and Explain Results - it is very important topic and you will have many questions related to this area. Read how MongoDB query optimizer chooses the most efficient query plan and when plan can be changed also about Explain Results and explain command in context of unsharded and sharded collections . Pay attention to Verbosity Modes.
  2. Sharding. MongoDB uses sharding to support deployments with very large data sets and high throughput operations. Understanding of this topic is essential for the exam. You can expect many questions related to shard clusters.
    a. Shard Cluster Architecture- make sure you understand all components of shard cluster. You need to know key responsibilities of mongoS, config servers also when to start shard your cluster.
    b. Shard Keys. you will be ask to choose optimal shard key for given query examples. Remember that the most frequently used queries should use the key and shard collections must have an index that supports the shard key. If you use compound index the shard key must be a prefix of the index. .
    c. Immutable key - once you shard a collection, the selection of the shard key is immutable; i.e. you cannot select a different shard key for that collection, starting in MongoDB 4.2 you can update a document’s shard key value unless the shard key field is the immutable _id field.
    d. Hashed Sharding - provides more even data distribution across the sharded cluster at the cost of reducing range query capabilities and shard zones functionality.
    e. Shard key on _id field - “_id” file has a high cardinality and low frequency but is monotonically increasing due to ObjectId. Good idea is to choose this field as hashed shard key
    f. Primary Shard - Each database in a sharded cluster has a primary shard that holds all the un-sharded collections for that database. Also Aggregation Pipeline which is running on shard cluster will execute the $out stage and the $lookup stage on the database primary shard.
    g. Chunks - A chunk consists of a subset of sharded data. Remember that each chunk has a inclusive lower and exclusive upper range based on the shard key.
    h. Balancer - balancer is a background process that monitors the number of chunks on each shard. It is worth to learn Migration Thresholds, how to start or stop balancer, also other commands for balancer management
    i. Sharding Methods - sh.status() is very important from exam point of view. Execute sh.status() on mongoS in your shard cluster and try to memorize as many information as possible. It will help on exam
  3. Replication - One more important exam area - learn all capabilities of statement based replication mechanism in MongoDB which provides redundancy and high availability.
    a. Replica Set Election- The rule is that the majority of the replica set needs to be up to successfully elect a primary.
    b. Replication Methods - rs.status() method is important from exam point of view. Execute rs.status() on your replica set and try to memorize all information in returned document about replication.
    c. db.isMaster() - execute db.isMaster() method and see document that describes the role of the mongod instance.
    d.
    Replica Set Arbiter - Arbiter is a light weight process they do not consume much hardware resources, hey are just to vote in election when there is any node failure. We should avoid arbiters in production deployments.
    e. Hidden Replica Set Members - to run ad-hoc or analytics query or make backups, highly recommended is to properly configure replica set. In particular, adding a node designated for analytics or for backups as a hidden, non-electable member of the replica set. Hidden members have properties that make them great for analytics.
    f. Delayed Replica Set Members - delayed member’s data set reflects an earlier, or delayed, state of the set. delayed members are a “rolling backup” or a running “historical” snapshot of the data set, they may help you recover from various kinds of human error. Must be priority 0, and also should be hidden.
  4. Security - you can expect number of questions related to authentication, access control, encryption and auditing.
    a. you need to distinguish between Authentication and Authorization
    b.
    Authentication Methods - To authenticate as a user, you must provide a username, password, and the authentication database associated with that user. You need to also know how to use db.auth() method.
    c.
    RBAC - how to enable role access control, it is also important to know what are the roles , what they consist of, how to grant roles to users and how to display role privileges, db.getRoles() method is very useful
    d. Built-In Roles - make sure you have good understanding of MongoDB’s built-in roles. MongoDB provides the built-in database user and database administration roles on every database. MongoDB provides all other built-in roles only on the admin database. Example of database administration roles: dbAdmin, dbOwner, userAdmin.
    e.
    TLS/SSL - there is number of questions related to Transport Layer Security. TLS/SSL settings are important for exam. You need to know difference between “--tlsCAFileand “--tlsCertificateKeyFileand know how to use x.509 Certificate for Membership Authentication, and when to use preferTLS mode.
    f. Encryption at Rest - MongoDB Enterprise supports secure transfer of keys with Key Management Interoperability Protocol (KMIP) compliant key management appliances. You should know the benefits of using KMIP server like master key rotation or capability for the keys to be stored in the key manager.
    g.
    Auditing - MongoDB Enterprise includes an auditing capability for mongod and mongos instances. For exam you should know the difference between MongoDB DDL (create collection, create database, create index, rename collection, drop collection, drop database, drop index) and DML (CRUD), also you should know how to enable CRUD operations for auditing and why is disabled by default (too many logs, performance loss).
  5. CRUD - of course the CRUD operation could not be missing. Important CRUD operation for C100DBA exam are: find(), updateOne(), updateMany(), replaceOne(), insertOne(), insertMany().
    a. make sure you know and understand find() method well together with important Query and Projection Operators: Comparison - $gt, $gte, $in, $ne, $eq. Logical - $and, $or, Element- $exists, Array - $all, $elemMatch, $size
    b. projections techniques- for example how to remove the _id field from the results by setting it to 0 in the projection.
    c. know the difference between $and and implicit AND operation.
    d. know the difference between updateOne() and replaceOne()
    e.
    understand write concern levels and the wtimeout option.
    f. understand available read concern and pay attention to majority and linearizable.
    g. know that db.collection.find() method returns a cursor and you need to iterate the cursor. In the mongo shell the cursor is automatically iterated up to 20 times.

Summary

I hope this post will be useful for people who wants to take next step in their career and pass MongoDB C100DBA certification. The range of knowledge as you can see is wide and sometimes you need to know the details, but this knowledge will make you a better specialist and will open more opportunities in front of you. I hope you pass exam and find your name under MongoDB Certified Professional Finder !

--

--