Platinum Partner
java,sql,nosql,architecture,tips and tricks,postgresql,tools & methods,mongodb

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.

Check out Fontaine's full article for the complete queries and his back-and-forth with the original NBA MongoDB article.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}