Monday, December 30, 2013

Sharding in Database

Video reference for database sharding:
http://www.youtube.com/watch?v=FwJ7bJaan7Y

1>Vertical sharding ; eg. user can have many contacts and user data can grow enormously while contacts data can grow more enormously so Use table's data is stored in one machine(called shard say shard1) and Contact is stored in another machine(shard2) .
2>Horizontal sharding : eg. User's table can have millions and billions of data so now sharding is seprated depending uopn the user alphabet lik users with starting name from A-E store in shard1 and user's from F-G store in shard2 etc and a mappping table is created to say A-E users are stored in shard1 and F-G users are stored in shard2.So query should first lookup to this mapping table and then to actual shards.

>>Types of 

No comments:

Post a Comment