关系数据库可以横向扩展吗

经过一些谷歌搜索后,我发现:

After some googling I have found:

来自 mysql 文档的注释:

MySQL Cluster 自动跨节点分片(分区)表,使数据库能够以低成本、商品化的方式横向扩展用于服务读写密集型工作负载的硬件,可同时访问来自 SQL 和直接通过 NoSQL API.

MySQL Cluster automatically shards (partitions) tables across nodes, enabling databases to scale horizontally on low cost, commodity hardware to serve read and write-intensive workloads, accessed both from SQL and directly via NoSQL APIs.

关系型数据库可以横向扩展吗?它会以某种方式基于 NoSQL 数据库吗?

Can relational database be horizontal scaling? Will it be somehow based on NoSQL database?

有人有真实世界的例子吗?

Do someone have any real world example?

如何管理此类数据库中的sql请求、事务等?

How can I manage sql requests, transactions, and so on in such database?

推荐答案

我认为答案是肯定的.您必须记住,SQL 只是一种数据访问语言.绝对没有理由不能跨多台计算机和网络分区进行扩展.这是一个具有挑战性的问题吗?最肯定的是,这就是为什么这样做的软件还处于起步阶段.

I think the answer is, unequivocally, yes. You have to keep in mind that SQL is simply a data access language. There is absolutely no reason why it can't be extended across multiple computers and network partitions. Is it a challenging problem? Most certainly, and that's why software that does it is in its infancy.

现在,我想您要问的是我所熟悉的以及标准 SQL 类型关系数据库管理系统中的所有功能都可以开发为以这种方式与多个服务器一起使用吗?"虽然我承认我没有深入研究这个问题,但有一些定理说不,它不能".一致性-可用性-分区定理假定我们不可能在同一水平上同时具备这三种品质.

Now, I think what you are trying to ask is "Can all features that I am familiar with and that arrive in a standard SQL-type relational database management system be developed to work with multiple servers in this manner?" While I admit I haven't studied the problem in depth, there are theorems out there that say "No, it cannot." Consistency-Availability-Partition Theorem posits that we cannot have all three qualities at the same level.

现在,出于所有实际目的,分片"或分区"或任何您想称之为的东西都不会消失;从相反的方面来说.这意味着,考虑到 CAP 定理的适用程度,我们将不得不改变我们对数据库的看法,以及我们如何与它们交互(至少在一定程度上).许多开发人员已经做出了在 No-SQL 平台上取得成功所必需的转变,但更多的开发人员还没有.最终,将开发出足够成熟的模型和足够有效的变通方法,从而使传统 SQL 数据库(在您所指的意义上)在多台机器上或多或少地实用.这已经开始出现了,我想说再等几年,我们就会达到这一点.或者,我们将集体将思维转移到不再需要的地步,世界将变得更美好.:)

Now, for all practical purposes, "sharding" or "partitioning" or whatever you want to call it is not going away; to the contrary. This means that, given the degree to which CAP theorem holds, we are going to have to shift the way we think about databases, and how we interact with them (at least, to an extent). Many developers have already made the shift necessary to be successful on a No-SQL platform, but many more have not. Ultimately, sufficient maturity of the model and effective enough workarounds will be developed that traditional SQL databases, in the sense you refer, will be more or less practical across multiple machines. This is already starting to pan out, and I would say give it a few more years and we'll be to that point. Or we'll have collectively shifted thinking to the point where it is no longer necessary, and the world will be a better place. :)

相关文章