Principles of Sharding for Relational Databases