4 ms·
A couple of years ago, our infrastructure team implemented the ability to move a table from one MySQL host to another. This allowed us to have mu
by JohnBooty 7y ago
A couple of years ago, our infrastructure team
implemented the ability to move a table from one
MySQL host to another. This allowed us to have
multiple masters with different tables on different
masters, which we refer to as “vertical sharding”.
Each one of these masters, along with its slaves,
is called as a “partition” at Quora.
I nearly stopped reading here.
Naming things is hard, but why would they choose a term ("partition") that has already existed for many decades in the same context?
That's nonsensical.
- Ozzie_osman 7y agoWhat's nonsensical about it? A partition is just a logical split of your data. You can do horizontal partitioning (aka "horizontal sharding"), like splitting the same table to different databases by key. Or you can do vertical partitioning, where you put different tables in different databases.
- jeffdavis 7y agoI always thought vertical partitioning meant to split by columns (that is, have fewer columns per table, and you need to join to get the original back).
- JohnBooty 7y agoYou're correct! https://stackoverflow.com/questions/18302773/what-are-horizontal-and-vertical-partitions-in-database-and-what-is-the-differen https://stackoverflow.com/questions/18302773/what-are-horizo... https://www.datanumen.com/blogs/in-depth-understand-of-vertical-partitioning-in-sql-server/ https://www.datanumen.com/blogs/in-depth-understand-of-verti...
- JohnBooty 7y agoFor one thing, there's already a term for what they're doing. It's called sharding. Why make shards and decide to call them partitions, when "partitions" means something else in this context and there is already a name (shards) for what's being done?
- Ozzie_osman 7y agohttps://en.m.wikipedia.org/wiki/Partition_(database) https://en.m.wikipedia.org/wiki/Partition_(database) https://stackoverflow.com/questions/20771435/database-sharding-vs-partitioning https://stackoverflow.com/questions/20771435/database-shardi...
- JohnBooty 7y agoThey're talking about MySQL specifically, not databases in the abstract. Sure, yeah, you can call anything "paritioning" in a general sense when it comes to data storage, including building a physical wall between your database servers, or adding dividers to your shoebox full of recipe cards. Here's a more relevant link. https://dev.mysql.com/doc/refman/5.7/en/partitioning.html https://dev.mysql.com/doc/refman/5.7/en/partitioning.html It's like if you had a MySQL table that contained some sort of metadata that helped you find other data more quickly. Would you call that table an "index?" I mean, yeah, sure, it's an index (in the abstract sense of the word) but that would be awfully confusing in in the context of a MySQL database since it already has a pretty specific meaning there.
- correct_horse 7y agoYou must not like the term computer to refer to electronic computers because it already refers to a human profession. https://en.m.wikipedia.org/wiki/Computer_(job_description) https://en.m.wikipedia.org/wiki/Computer_(job_description)
- JohnBooty 7y agoPoor analogy. Quora took an existing database practice that already has a name (sharding) and decided to refer to it by the name of another existing database practice (partitioning). For your analogy to make sense, we'd have to use two established titles with very specific meanings. "Here at Quora, we have medical doctors. Internally, we refer to them as nurses."
- crazygringo 7y agoHmm... well I'm not aware of an existing term that refers specifically to either the master or slave in a master-slave scenario. And any other logical word I can imagine ("version", "copy", "split", "part", etc.) seems just as confusing as "partition". And at least "partition" decently suggests the general idea. The other strategy -- using a made-up word like "flimflam" -- is potentially even more confusing. What are you suggesting instead?
- JohnBooty 7y agoI'm not sure exactly what they were doing. It doesn't sound like anything novel. (Also doesn't sound like master/slave, which typically refers to a replication setup) Sounds like they had some tables in one database and some tables in another. If they were using MySQL's built-in capabilities to do such a thing, and wanted to combine things at the database level there is already a specific term for that: federation. https://dev.mysql.com/doc/refman/5.6/en/federated-create-server.html https://dev.mysql.com/doc/refman/5.6/en/federated-create-ser... Or perhaps they took a more service-oriented approach, in which the databases don't talk directly to each other but instead expose their data via some application layer. In which case there's a term for that: a service-oriented architecture.