IBM DeveloperWorks recently published two articles addressing scalability techniques for relational databases using Java technologies. The both focus on horizontal scaling (also known as sharding and now, apparently, slicing too), which according to wikipedia, is when
rows of a database table are held separately, rather than splitting by columns (as for normalization). Each partition forms part of a shard, which may in turn be located on a separate database server or physical location.
Sharding duplicates a database model (or schema) across multiple database servers (this is different than traditional partitioning, which is row based and usually on the same server).
The first article entitled “Sharding with Hibernate Shards” explores when sharding works, and when it doesn’t, and then demonstrates a simple Hibernate-Spring application capable of handling terabytes of data. What’s more, this article was authored by Beacon50′s managing partner, Andrew Glover.
The second article entitled “Scaling OpenJPA applications with Slice” profiles Slice, which is a module for distributed persistence in OpenJPA. Slice enables an application developed for a single database to adapt to a distributed, horizontally partitioned, possibly heterogeneous, database environment. This all occurs without any change in the original application code or the database schema.
Both articles are a great starting point for exploring how to scale, via the application level, relational databases.