选择SQL/NoSQL应该考虑哪些因素?

发布于 2024-08-25 05:15:38 字数 1431 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

逆蝶 2024-09-01 05:15:38

对我来说,你没有任何具体的问题需要解决。如果需要ACIDity,就使用数据库;如果你不这样做,那也没关系。最后只需构建您的应用程序即可。让我引用 NoSQL:如果就这么简单

真正需要指出的是,如果你因为无法选择数据库而无法做出超级棒的东西,那么你就做错了。如果你了解mysql,就用它。当您真正需要时进行优化。像 ak/v 存储一样使用它,像 RDBMS 一样使用它,但看在上帝的份上,构建你的杀手级应用程序!这些对于大多数应用程序来说都不重要。 Facebook 仍然大量使用 MySQL。维基百科大量使用 MySQL。 FriendFeed 大量使用 MySQL。 NoSQL 是一个很棒的工具,但它肯定不会成为您的竞争优势,它不会使您的应用程序变得热门,而且最重要的是,您的用户不会关心这些。

To me, you don't have any particular problem to solve. If you need ACIDity, use a database; if you don't, then it doesn't matter. At the end just build your app. And let me quote NoSQL: If Only It Was That Easy:

The real thing to point out is that if you are being held back from making something super awesome because you can’t choose a database, you are doing it wrong. If you know mysql, just used it. Optimize when you actually need to. Use it like a k/v store, use it like a rdbms, but for god sake, build your killer app! None of this will matter to most apps. Facebook still uses MySQL, a lot. Wikipedia uses MySQL, a lot. FriendFeed uses MySQL, a lot. NoSQL is a great tool, but it’s certainly not going to be your competitive edge, it’s not going to make your app hot, and most of all, your users won’t give a shit about any of this.

狼性发作 2024-09-01 05:15:38

Digg 有一些有趣 关于此问题的文章。本质上,您将处理的负担转移到写入而不是读取,这在高度可扩展的应用程序中可能是理想的。 Cassandra 特别具有高可用性。

简单来说,Cassandra 是一个
具有 BigTable 的分布式数据库
运行在 Dynamo 上的数据模型
基础设施。它是面向列的
并允许存储
相对结构化的数据。它有一个
完全去中心化的模式;每个节点
是相同的并且没有单一的
故障点。也是非常的
容错;数据被复制到
多节点、跨数据
中心。卡桑德拉也很
松紧带;读写吞吐量
随着新机器的增加线性增加
添加。

Digg have some interesting articles on this question. Essentially, you're shifting the burden of processing to writes rather than reads, which may be desirable in highly scalable applications. Cassandra specifically is also highly available.

Simplistically, Cassandra is a
distributed database with a BigTable
data model running on a Dynamo like
infrastructure. It is column-oriented
and allows for the storage of
relatively structured data. It has a
fully decentralized model; every node
is identical and there is no single
point of failure. It's also extremely
fault tolerant; data is replicated to
multiple nodes and across data
centers. Cassandra is also very
elastic; read and write throughput
increase linearly as new machines are
added.

美胚控场 2024-09-01 05:15:38

我喜欢 Ian Eure 的经验法则:“如果您在数据库之上部署 memcache,那么您就是在发明自己的临时且难以维护的 NoSQL 系统。”

http://www.rackspacecloud .com/blog/2010/02/25/should-you-switch-to-nosql-too/

I liked Ian Eure's rule of thumb: “if you’re deploying memcache on top of your database, you’re inventing your own ad-hoc, difficult to maintain NoSQL system.”

http://www.rackspacecloud.com/blog/2010/02/25/should-you-switch-to-nosql-too/

a√萤火虫的光℡ 2024-09-01 05:15:38

当您说数据模型相当简单时,这可以说明 NoSQL 选项。

当您有大量属性可供选择、事务负载繁重或表结构复杂时,这就是传统 SQL 表的情况。

我建议了解一下使用一两个 NoSQL 数据库实现数据模型有多困难。当这相当困难时,您还可以制作一个经典的表模式来进行比较。

当您在使用 NoSQL 时遇到困难时,这可以说明 SQL 选项。但也可能是,使用 NoSQL 可以更好地处理重负载——但也可能是一个好的 SQL 数据库可以充分扩展……

可以使用一个简单的代理服务器来完成缓冲。

也可以使用简单的代理服务器来完成缓冲……在遇到困难时, 也可以考虑 NoSQL 和 SQL 的混合。

When you say, data modell is rather simple, this could speak for the NoSQL option.

When you have plenty of attributes to make selections, heavy transaction load or complicated table structures, that would speak for traditional SQL tables.

I would recommend to find out how difficult it would be to implement the data modell with one or two NoSQL databases. When this is rather difficult, you could also make a classical table schema to compare with.

When you have difficulties with NoSQL, this could speak for the SQL option. But also it could be, that the heavy load is better handled with NoSQL -- but also it could be that a good SQL database scales sufficiently ...

Buffering can also be done with a simple Proxy-Server ...

On difficulties, a mix of NoSQL and SQL could be also considered.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文