From: Mike Bayer Date: Wed, 8 Dec 2010 04:11:47 +0000 (-0500) Subject: - gently push users towards entity name for simple cases X-Git-Tag: rel_0_7b1~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c67cf5cafa5a1ba4de4f9ee8f0a39521af81f30;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - gently push users towards entity name for simple cases --- diff --git a/examples/sharding/__init__.py b/examples/sharding/__init__.py index 19f6db2459..d4b4639494 100644 --- a/examples/sharding/__init__.py +++ b/examples/sharding/__init__.py @@ -1,4 +1,4 @@ -"""a basic example of using the SQLAlchemy Sharding API. +"""A basic example of using the SQLAlchemy Sharding API. Sharding refers to horizontally scaling data across multiple databases. @@ -14,7 +14,17 @@ The basic components of a "sharded" mapping are: Query ("query_chooser"). If it returns all shard ids, all shards will be queried and the results joined together. -In this example, four sqlite databases will store information about -weather data on a database-per-continent basis. We provide example shard_chooser, id_chooser and query_chooser functions. The query_chooser illustrates inspection of the SQL expression element in order to attempt to determine a single shard being requested. +In this example, four sqlite databases will store information about weather +data on a database-per-continent basis. We provide example shard_chooser, +id_chooser and query_chooser functions. The query_chooser illustrates +inspection of the SQL expression element in order to attempt to determine a +single shard being requested. + +The construction of generic sharding routines is an ambitious approach +to the issue of organizing instances among multiple databases. For a +more plain-spoken alternative, the "distinct entity" approach +is a simple method of assigning objects to different tables (and potentially +database nodes) in an explicit way - described on the wiki at +`EntityName `_. """