it's true that in some cases that's a good trick, but many database engines are able to map this kind of sharding "behind the scenes": i.e. you'll always deal with the same table name, but it will be physically stored in different zones according to any custom sharding rule.
With Hibernate you could do that by customizing the Persister (see annotation options @org.hibernate.annotations.Entity(persister=yourImplementationClassName) ), or in case you're never interested in loading older than today data it might be simpler to generate the table name for today dynamically by extending your Dialect.
_________________ Sanne http://in.relation.to/
|