Previous | Next --- Slide 22 of 58
Back to Lecture Thumbnails
muyangya

There are mainly two kinds of partition in DB, which aim at solving the problem in two different ways. Both of these methods can be shown in this slide.

Horizontal partitioning, which is often referred to as "Sharding". The solution is to divide the data into each shard based on the shard key. Eg: We can store the data of A-M in server 1, and store data of user N-Z in Serer 2. Or we can acquire the shard key using hashing. It works really good to improve scalablility, but it makes operations like joins and unions much harder to accomplish, since we have to collect data from multiple tables on multiple servers.

Vertical partitioning, on the other hand, split the columns across tables. Eg: we can store the user's photos on one server, user's news feed on the other one, etc.

flyne

http://en.wikipedia.org/wiki/Shared_nothing_architecture

Here is another type of scalable architecture that I thought was interesting