MongoDB for Developers (python flavour) – course review

Some while ago I decided to dive into the NoSQL world. This decision was driven partially by curiosity if it could be treated as an alternative to the Elasticsearch, which I have seen being used (along with Kibana) to implement rich analytics on mixed (text+numerical) data. I wanted also to understand when I would want to use a NoSQL database over a more conservative solution (e.g. PostreSQL or MySQL).

It turns out the company behind the popular MongoDB NoSQL database offers a number of free online courses, targeting audiences with different levels of expertise (see https://university.mongodb.com/). Among introductory courses, you can find “M101P: MongoDB for Developers” targeting python developers. Python expertise is not a strict requirement for this course since a compact introduction to python is also available during the first lesson.

The course consists of 6 units and a final exam. Units are released on a weekly basis. After completing the course you will understand the following

  • Database instalation and python side setup
  • Working inside mongo shell – creating/reading/updating data
  • Basics of schema design. Most importantly – when to denormalize
  • Basics of performance tuning such as using database indexes and analizing query execution via explain
  • Aggregation framework
  • Basics of multihost setup, e.g. using sharding to spread workload across multiple slaves

Each unit ends with a homework assignment which will give you 50% of the final score. Remaining part comes from the final exam.

Python related part (i.e. how to incorporate MongoDB into your application using the pymongo package) makes maybe 20% of the course content. At first, this may seem low. The more I think about it, the more right it feels. Working via mongo shell, i.e. using JSON to construct your queries or aggregations is a valuable skill. If you are able to do that using JSON, nearly automatically you know how to do that in python using pymongo. There are some minor differences, but the course stresses them out.

As written above, home assignments will give you 50% of the final score. Therefore lack of difficulty of some assignments may be surprising. For example, some of them seem to only test copy&paste capability, like the one for building a 3 server large replica set (last chapter of the course). For some assignments you get a test case with a known answer to verify that your solution to the problem is working correctly. Then you need to run it on different data and post the answer. In such case it is nearly impossible to post a wrong answer to such problem (assuming you got a correct one to the test case).

Overall, this gives you a positive push towards trying various things yourself. In the above-mentioned case of building a replica set, I have a feeling I’ve learned and memorized something. Even if it was only copy&paste into the terminal it had a better educational effect than just reading the text or watching the video.

The course ends with an exam consisting of 10 questions. Since the worst graded homework is automatically canceled it is fairly easy to get 100% homework score, which gives you a 50% “pedestal” toward the final grade. In such case you need to give just three correct answers in the final exam to positively complete the course (final score threshold is 65%).

The only two flaws I have found in the course are the following:

  • Videos introduce a range of different mongodb versions, sometimes “ancient” (e.g. 2.6). In some cases those present a different behavior than the latest and greatest one (3.4, which, BTW, was not supported in that edition of the course). The positive side is that in all such cases you always get a comment/errata under the video, so it’s not really a problem.
  • Time to time the instructor says in a plain text he doesn’t know how to explain some observed behaviors and leaves it like that. One such thing was why having elements in a set (on mongo side) does not guarantee the set ordering (underlying implementation using hash tables I guess). This leaves a bad impression since the course was created by the company that created mongodb. It’s the only real issue I have when it comes to course quality, fortunately this is rare

Overall the course is well prepared and was worth the time invested (BTW the “required time” estimates for each unit felt overestimated in most cases). I would decide to take this course again, even with my current, vague feeling, that I won’t decide to use mongodb anytime soon (perhaps never). So go register here, since new course session starts in couple of days.

Leave a Reply

Your email address will not be published.