MongoDB is the New MySQL
redmonk.com
redmonk.com
On the bright side, one could say that at least half of the PHP/MySQL tag team has been improved significantly by being replaced with Python/MongoDB, as theological issues aside, Python is a lot less broken than PHP :)
that's an excellent - and much shorter - way of putting it.
I see people angry about not using the "right tool for the job" all the time with regard to web applications. What other tools do you feel aren't used when they should be?
And in this context, MySql would be way to heavy.
Your comment is confusing. Can you please explain:
You replaced sqlite with mongodb, as an embedded database? How can mongodb run without a server?
Are you saying mongodb is more lightweight than sqlite? If so I find this very surprising, can you elaborate?
MongoDB isn't as light as sqlite, but for our usage the difference was negligable with MongoDB running with around 3MB memory footprint. In the end we get speed and ease of use/flexibility of not having to deal with sql or schemas.
eg Real-time analytics
If you need a pre-planned schema from database over making one on the fly (even accidentally), then MySQL is better as MongoDB is schema-less.
eg Rapidly changing input
If you are worried about Oracle's acquisition of Sun and MySQL (Switching to Postgre is the closest alternative though).
MySQL sharding is hard, MongoDB can automate it to a certain extent (MySQL requires third party tools I believe).
eg Distributing large datasets
Note: Other databases, eg Cassandra can also automate 'sharding' for example.
When did Mysql have relational integrity?
MongoDB can be an excellent solution for professionals for many problems.
Relational databases were designed around the idea of minimizing storage footprint, and we have nearly infinite storage capacity relative to many databases, so many devs don't care about only having one copy of a piece of data in the DB.
Also, SQL is great as a data retrieval language, but it is awful for inputting data. Yes, it works, but writing data to MongoDB in general has felt more natural than generating SQL to shotgun in data.
You could argue that ORM's solve a lot of the uglyness of inputting data into a DB and I agree with you, but you still have to deal with table migrations and being able to just add a field in your code and not have to go hold the database's hand or write a migration to make it work is incredibly convenient.
In the end, MongoDB solves a lot of convenience issues for programs that don't need relational data or programmers who don't want to use an ORM, create SQL strings, or write migrations to get their database to store their data.
It's not for everybody, but if it fits your needs, it solves some problems much more conveniently than MySQL.
However, I disagree with your other statements:
(1) we do not have infinite storage. Most data stores keep everything in RAM, and that is pretty limited.
(2) It's really easy to input data into SQL. There are in fact a bunch of methods to do so (almost all still rely on SQL).
(3) (more of a comment, than disagreement) ORM's don't solve much. They just remove the need for engineering a data access API and trade it for performance and cleanliness of code.
One of my current projects is modelling a rather complex set of intertwined business processes. Part of the problem is just getting the client to explain their existing processes completely. Another part of the problem is that the processes are always changing. As soon as I think I finally have all the data models figured out, there's one more tweak. I am not great at data modelling or SQL, but tweaking a dozen 50 line joins on a daily basis is not happy fun time for anyone. At some point the specced data model, the model as implemented, and the conceptual model that's in my head get out of sync in some mysterious way, the plot is lost and it all turns to shit. On top of this I'm also trying to manage an object model that sorta maybe corresponds to the data model. In cases where the spec changes frequently, the higher cognitive load of maintaining a decent relational model is simply not worth it.
Well, foreign keys are not just a way to minimize storage: it speeds up future updates. If you duplicate your data everywhere for faster read access, your write cost just increased.
MongoDB is not the new MySQL, because software with as much inertia and adoption as MySQL will not see easy or even complete replacement. Case-in-point: IE6. IE6 is still with us today, as much as we hate it. You can make all the arguments for a modern browser that you want, but businesses and a few people say, "But I like it better."
Are there easy code migrations to MongoDB? No! Are there easy query migrations? Not really. It isn't a linear transition from one to the other. So no only do you have to rewrite your software, but you've got to pitch your SQL references out the window along with your queries.
I believe that Postgres will replace MySQL. It's mature, SQL-based and similar enough that only tweaks are needed to get a code base running. Oh, and it's free.
New projects may support MongoDB, but I'd be surprised if Wordpress ever came out with a version to support it.
Just my 2¢.
http://www.flickr.com/photos/sog/5909237447/in/photostream/
If sociologists ran The Onion this would be on the front page.
The x axis of the graph is unexplained, but the idea (of being able to measure sentiment) isn't crazy.
http://jeffreybreen.wordpress.com/2011/07/04/twitter-text-mi...
applied against a mongodb query. obviously not statistically representative; but rather an indication of what an acceptable profile looks like.
What you should probably not do, however, is elide the essential difference between these two measurements. Twitter is not a representative sample of anything but Twitter. Much of Twitter is spammers and shills, not customers. A lot of Tweets aren't even from humans. And people can mention MongoDB without knowing the slightest thing about it, and I am sure many do. I'm doing it now.
that said, it's an interesting proxy for examining questions of sentiment, and its predictive ability has been examined several times academically within specific contexts (elections and markets - e.g. this one by Cornell http://arxiv.org/abs/1010.3003) and found to be relatively accurate.
so agreed, it's not representative. but that doesn't mean it's not interesting and potentially useful.
I'm not saying that MongoDB isn't growing. I just think that it's way early to pronounce it as a replacement for MySQL.
These kinds of provocative but false titles belong in the cheap tabloids, not on the front page of Hacker News.
i tried to explicitly make the point that MongoDB is not a replacement for MySQL, it is rather following a similar path from a licensing, usage and market reaction standpoint. and that mongo's course within the nosql world may follow the pattern we saw mysql track w/in the relational database market.
from this comment, it doesn't seem like i was successful on that score.
MongoDB is indeed an interesting software and it's on a promising start. I'll be interested to see where it's going. Maybe one day the title of your post will be true.
http://hntrends.jerodsanto.net/?q=MongoDB%2C+MySQL%2C+Redis%...
I think it's early to call a NoSQL winner/hammer now but I personally expected one eventually, http://www.quora.com/Will-there-be-a-new-de-facto-standard-o... although others aren't so sure. Just seems more convenient to use one database even if it's not an ideal fit for every task.
Personally, PostgreSQL and MongoDB meet just about all of my non-graph data store needs. For graph data, I keep switching between Neo4j, Sesame, and AllegroGraph - can't make up my mind since they have different capabilities (Sesame and AG for fast indexed SPARQL queries, Neo4j for graph traversal).
Being able to do this without jumping all the way into writing map-reduce bits, but saving the time of setting up a rigid schema, makes it easy to see why MongoDB is so popular. To me, that is why MongoDB is the new MySQL.
In addition, there are some "advanced" features that may not be provided by MongoDB: you can choose your index type, rebuild the index, update the stats that will help the query optimizer decide if the index should be used at all, etc.
Not sure what other strategies exist to reliably build an index.
http://www.postgresql.org/docs/current/static/sql-createinde...
Now what's the next PostgreSQL?
(yes I know it doesn't "perform" as well as the other NoSQL stores but performance is not without tradeoffs [2])
[1] http://bret.appspot.com/entry/how-friendfeed-uses-mysql
[2] http://www.caradvice.com.au/wp-content/uploads/2006/12/Ferra...
I'd rather partition the data based on function onto distinct clusters, you know like eBay do.
You can update the indexes in a transaction too, so that's not necessarily an issue. MySQL has problems with this due to locking but the MVCC implementation in PostgreSQL allows much better concurrency.
* = For a certain value of "forever"
soon as i can get back into to shut things down and cache everything it'll go back to normal. ish.
apologies in the meantime.
A decade later, MySQL – a feature-poor database relative to the commercial alternatives at the time – was the most popular relational database on the planet.
I would have thought the most popular relational database on the planet would be SQLite....since it ships with every android and iOS device, and with Firefox and Chrome.
That said, when you have a problem that mongo solves well, boy howdy is it nice.
It can be said scaled MySQL is a no-SQL. MongoDB is the New MySQL with this point of view.
I'll admit that I'm not familiar with Ohloh, but I don't see how both of those statements can be true.
Redis is a fast key-value store with the nice property that values can be things like lists and sets instead of just plain strings.
MongoDB is a full-on document store for JSON-ish documents with support for complex ad hoc javascript queries over those documents, indexing, map-reduce style aggregation, and other fun arbitrarily complex search and collection scenarios that don't map into a simple key-value look up system.