TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

MongoDB is the New MySQL

74 点作者 sogrady将近 14 年前

19 条评论

KaeseEs将近 14 年前
I would tend to say that MongoDB is the new MySQL in a different way - it's the default not-really-suitable hammer that the current generation of amateur software carpenters are using to turn every problem into a nail. It's not super elegant, but most of the time it works, sort of.<p>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 :)
评论 #2735821 未加载
评论 #2736221 未加载
评论 #2736351 未加载
评论 #2735907 未加载
评论 #2737033 未加载
programminggeek将近 14 年前
I think that one of the reasons that MongoDB is getting traction is that many people don't use relational databases in a relational way for many projects. Lots of data just isn't as relational as we hope it would be and also people are terrible at modeling data in a relational way.<p>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.<p>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.<p>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.<p>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.<p>It's not for everybody, but if it fits your needs, it solves some problems much more conveniently than MySQL.
评论 #2735916 未加载
评论 #2736322 未加载
评论 #2736509 未加载
评论 #2736641 未加载
oldgregg将近 14 年前
<a href="http://webcache.googleusercontent.com/search?q=cache:redmonk.com/sogrady/2011/07/06/mongodb-is-the-new-mysql/&#38;hl=en&#38;strip=1" rel="nofollow">http://webcache.googleusercontent.com/search?q=cache:redmonk...</a>
trebor将近 14 年前
Allow me to play devil's advocate for a moment.<p>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."<p>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.<p>I believe that Postgres will replace MySQL. It's mature, SQL-based and similar enough that only <i>tweaks</i> are needed to get a code base running. Oh, and it's free.<p>New projects may support MongoDB, but I'd be surprised if Wordpress <i>ever</i> came out with a version to support it.<p>Just my 2¢.
mechanical_fish将近 14 年前
"MongoDb Sentiment Distribution" is a riot:<p><a href="http://www.flickr.com/photos/sog/5909237447/in/photostream/" rel="nofollow">http://www.flickr.com/photos/sog/5909237447/in/photostream/</a><p>If sociologists ran <i>The Onion</i> this would be on the front page.
评论 #2735844 未加载
VilleSalonen将近 14 年前
Most of these Point seem to ring a bit hollow. MongoDB gets criticism: therefore it's the new MySQL? Or because they both use open source licenses?<p>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.<p>These kinds of provocative but false titles belong in the cheap tabloids, not on the front page of Hacker News.
评论 #2735787 未加载
Detrus将近 14 年前
HN Trends mentions of the other NoSQL contenders are pretty close to MongoDB.<p><a href="http://hntrends.jerodsanto.net/?q=MongoDB%2C+MySQL%2C+Redis%2C+Cassandra%2C+CouchDB" rel="nofollow">http://hntrends.jerodsanto.net/?q=MongoDB%2C+MySQL%2C+Redis%...</a><p>I think it's early to call a NoSQL winner/hammer now but I personally expected one eventually, <a href="http://www.quora.com/Will-there-be-a-new-de-facto-standard-of-databases" rel="nofollow">http://www.quora.com/Will-there-be-a-new-de-facto-standard-o...</a> 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.
评论 #2736220 未加载
评论 #2736176 未加载
mark_l_watson将近 14 年前
Not sure if I totally agree with the article, but MongoDB really is developer friendly: easy to set up and admin, slaves make create sources of analytics data (put a slave on each server that has analytics applications), useful for both large and small projects, etc.<p>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).
评论 #2735984 未加载
mikey_p将近 14 年前
The thing that I've found that makes MongoDB super easy for folks migrating from SQL is that it is easy to add indexes to arbitrary fields, and they work the same way as they do in MySQL. It's just a b-tree and if you can setup MySQL indexes, then you can build smart, well indexed structures and systems with Mongo.<p>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.
评论 #2736660 未加载
评论 #2735847 未加载
marshray将近 14 年前
Great!<p>Now what's the next PostgreSQL?
评论 #2735841 未加载
评论 #2735659 未加载
someone13将近 14 年前
Not sure if this is just me, but the site loads partway and then sits forever* and never loads any further. Anyone else have this problem?<p>* = For a certain value of "forever"
评论 #2735746 未加载
评论 #2735628 未加载
josephcooney将近 14 年前
The article says:<p>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.<p>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.
评论 #2736477 未加载
tedsuo将近 14 年前
I like and use both mongo and mysql. Where I think mysql shines is when you've been working on an applicaiton for 5 years, and end up connecting every piece to every other piece in ways you never imagined doing at the start. I think that's a lot trickier to do well in mongo, which favors denormalization since it's a document store. Given that most db's do not actually grow beyond what you can put on a single box, I suspect a lot of people may be avoiding problems they don't have while picking up problems they don't need by blindly switching to mongo.<p>That said, when you have a problem that mongo solves well, boy howdy is it nice.
frsyuki将近 14 年前
The article doesn't describe but one of the biggest difference is scalability. MongoDB supports horizontal scaling as a built-in feature. It's known that MySQL can be scaled out by sharding but you lose ACID with it. Of course scalability is required only when the service goes well. But it's important to considerate it if you intend to be successful.<p>It can be said scaled MySQL is a no-SQL. MongoDB is the New MySQL with this point of view.
stevemoy将近 14 年前
According to the chart in the linked article (<a href="http://www.flickr.com/photos/sog/5909237515/" rel="nofollow">http://www.flickr.com/photos/sog/5909237515/</a>), MySQL has had 73 (I assume distinct) committers in the past 12 months, but the most recent commit was over one year ago.<p>I'll admit that I'm not familiar with Ohloh, but I don't see how both of those statements can be true.
shapeshed将近 14 年前
MySQL and MongoDB have strengths and weaknesses based on use case. MongoDB isn't a drop in replacement for MySQL and you probably wouldn't choose it for something like a message queue.
antihero将近 14 年前
What advantages does MongoDB have over something like Redis?
评论 #2736358 未加载
sigzero将近 14 年前
Wow, I don't think you want that comparison.
评论 #2735790 未加载
nwmcsween将近 14 年前
MongoDB and MySQL aren't comparable, one is a document store the other is a relational store.