MongoDB vs. PostgreSQL for NBA Data Crunching
There is a long-ish tradition of comparing things to MongoDB. You know, MongoDB vs. Oracle, and MongoDB vs. Cassandra, and MongoDB vs. Redis and CouchDB. Now, Dmitri Fontaine at tapoueh.org has provided a new comparison: MongoDB vs. PostgreSQL. Fontaine's comparison works with an interesting dataset comprised of 30 years worth of NBA scores, teams, wins, and so on - it's actually a response to an earlier article that used MongoDB's aggregation framework to work with the dataset - and shows how PostgreSQL would handle similar operations.
Fontaine tries to follow the same queries as the earlier author, and finds that he sometimes produces produces slightly different results. Central to Fontaine's argument, though, is that his comparable SQL queries are more readable and more complete; in other words, he argues that it is clearer how he produced his results than it is in the MongoDB results.
Ultimately, Fontaine's argument is that MongoDB is late to the game. He says:
It's quite hard for me to appreciate the work done in the MongoDB aggregation framework really, when we've been enjoying advanced aggregation and statistics in PostgreSQL for a very long time. With the addition of Window Functions and Aggregate Functions for Statistics it's possible to implement advanced analysis right into your SQL queries.