Can a relational database scale horizontally

After some searches, I found:

Note from mysql docs :

MySQL Cluster automatically splits (partitions) tables into nodes, allowing databases to scale horizontally at low prices; commodity hardware for working with read and write loads accessed from SQL and directly through the NoSQL API.

Can a relational database scale horizontally? Will it be somehow based on a NoSQL database?

Does anyone have a real example?

How can I manage SQL queries, transactions, etc. in such a database?

+6
source share
2 answers

I think the answer is clear, yes. You should keep in mind that SQL is just a data access language. There is absolutely no reason why it cannot be expanded across multiple computers and network partitions. Is this a difficult problem? Most likely, and why the software that does this is in its infancy.

Now I think that you are trying to ask: "Can all the functions that I am familiar with that come into the standard SQL-type relational database management system should be designed to work with several servers in this way?" Although I admit that I have not studied the problem in depth, there are theorems that say: "No, it cannot." The consistency-accessibility-section theorem} states that we cannot have all three qualities on the same level.

Now, for all practical purposes, the "outline" or "separation" or what you want to call does not go away; otherwise. This means that, given the degree to which the CAP theorem holds, we will have to shift the way we think about databases and how we interact with them (at least to some extent). Many developers have already made the shift necessary to be successful on the No-SQL platform, but many others have not. Ultimately, sufficient model maturity and sufficiently effective workarounds will be developed that traditional SQL databases in the sense that you are talking about will be more or less practical for several machines. This is already starting to develop, and I would say give it a few more years, and we will be there. Or we will collectively translate thinking to such an extent that it is no longer needed, and the world will become a better place. :)

+7
source

Thanks for the question and answer. I tried to explain this to someone like this:

In terms of the CAP theorem, you cannot have all three. Therefore, when separation occurs (network or server failure):

  • A relational database on one server gives you C (consistency). Therefore, when P (partition failure - server / network), you cannot have A (availability - db decreases)

  • A nosql datastore gives you A , so when the P event occurs, you cannot have C (one or more of your replicated partitions will not have sync until n / w comes back and they all sync). So it will be eventually consistent

+3
source

Source: https://habr.com/ru/post/978752/


All Articles