SQL (MySQL) 与 NoSQL (CouchDB)
我正在设计一个必须存储大量数据的高度可扩展的应用程序.举个例子,它会存储很多关于用户的信息,然后是他们的很多消息、评论等.我以前一直使用 MySQL,但现在我想尝试一些新的东西,比如 couchdb 或类似的东西,而不是 SQL.
I am in the middle of designing a highly-scalable application which must store a lot of data. Just for example it will store lots about users and then things like a lot of their messages, comments etc. I have always used MySQL before but now I am minded to try something new like couchdb or similar which is not SQL.
有人对此有任何想法或指导吗?
Does anyone have any thoughts or guidance on this?
推荐答案
这里引用最近 Dare Obasanjo 的博文.
SQL 数据库就像自动传输和 NoSQL 数据库是像手动变速箱.一旦您切换到 NoSQL,你就变成了负责很多工作系统会自动处理一个关系数据库系统.相似的当您选择手动时会发生什么超过自动变速器.其次,NoSQL 让您可以做更多事情系统外的性能由消除大量完整性检查由关系数据库完成数据库层.同样,这是相似的如何获得更多性能通过驾驶手册离开你的车传输与自动传输车辆.
SQL databases are like automatic transmission and NoSQL databases are like manual transmission. Once you switch to NoSQL, you become responsible for a lot of work that the system takes care of automatically in a relational database system. Similar to what happens when you pick manual over automatic transmission. Secondly, NoSQL allows you to eke more performance out of the system by eliminating a lot of integrity checks done by relational databases from the database tier. Again, this is similar to how you can get more performance out of your car by driving a manual transmission versus an automatic transmission vehicle.
然而,最显着的相似之处是就像我们大多数人一样利用的好处手动挡车因为我们大部分的驾驶都是坐着在往返途中的交通中工作,也有类似的严酷现实因为大多数网站不在 Google 或Facebook的规模,因此没有必要对于 Bigtable 或 Cassandra.
However the most notable similarity is that just like most of us can’t really take advantage of the benefits of a manual transmission vehicle because the majority of our driving is sitting in traffic on the way to and from work, there is a similar harsh reality in that most sites aren’t at Google or Facebook’s scale and thus have no need for a Bigtable or Cassandra.
我只能补充一点,从您至少有一些经验的 MySQL 切换到您没有经验的 CouchDB,这意味着您将不得不处理一系列全新的问题并学习不同的概念和最好的实践.虽然这本身很棒(我在家里玩 MongoDB 并且非常喜欢它),但这将是您在估算该项目的工作时需要计算的成本,并且会带来未知的风险,同时承诺未知的收益.如果项目基于您不了解的技术,那么很难判断您是否可以按时完成项目并以您想要/需要的质量成功.
To which I can add only that switching from MySQL, where you have at least some experience, to CouchDB, where you have no experience, means you will have to deal with a whole new set of problems and learn different concepts and best practices. While by itself this is wonderful (I am playing at home with MongoDB and like it a lot), it will be a cost that you need to calculate when estimating the work for that project, and brings unknown risks while promising unknown benefits. It will be very hard to judge if you can do the project on time and with the quality you want/need to be successful, if it's based on a technology you don't know.
现在,如果您的团队中有 NoSQL 领域的专家,那么一定要好好看看它.但是,如果团队没有任何专业知识,就不要为了新的商业项目而使用 NoSQL.
Now, if you have on the team an expert in the NoSQL field, then by all means take a good look at it. But without any expertise on the team, don't jump on NoSQL for a new commercial project.
更新:只是为了在你开始的火上浇油,这里有两篇来自 SQL 阵营人员的有趣文章.:-)
Update: Just to throw some gasoline in the open fire you started, here are two interesting articles from people on the SQL camp. :-)
我等不及 NoSQL死了(原文没了,这里是copy)
与 NoSQL 思维作斗争,尽管这不是反对 NoSQL 的作品
更新:这里有一篇关于 NoSQL 的有趣文章
理解 NoSQL
I Can't Wait for NoSQL to Die (original article is gone, here's a copy)
Fighting The NoSQL Mindset, Though This Isn't an anti-NoSQL Piece
Update: Well here is an interesting article about NoSQL
Making Sense of NoSQL
相关文章