Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://groups.google.com/group/sqlalchemy/browse_thread/thread/187b3c13fa49a069" rel="nofollow noreferrer">I asked this question on a mailing list and got this answer by Michael Bayer</a>:</p> <blockquote> <p>if you'd like distinct classes to indicate that they "belong" in a<br> different database, and you have very clear lines as to how this is<br> performed, use the "entity_name" concept described at <a href="http://www.sqlalchemy.org/trac/wiki/UsageRecipes/EntityName" rel="nofollow noreferrer">http://www.sqlalchemy.org/trac/wiki/UsageRecipes/EntityName</a> . this sounds very much like your use case.</p> <blockquote> <p>The next idea is to use sharding. For that we need a way to distinguish between the databases from the perspective of an instance, as noted in the docs: "You need a function which can return a single shard id, given an instance to be saved; this is called "shard_chooser"</p> </blockquote> <p>horizontal sharding is a method of storing many <em>homogeneous</em> instances across multiple databases, with the implication that you're creating one big "virtual" database among partitions - the main concept is that an individual instance gets placed in different partitions based on some ruleset. This is a little like your use case as well but since you have a very simple delineation i think the "entity name" approach is easier.</p> </blockquote> <p>So the basic idea is to generate anonymous subclasses for each desired mapping which are distinguished by the <em>Entity_Name</em>. The details can be found in <a href="http://www.sqlalchemy.org/trac/wiki/UsageRecipes/EntityName" rel="nofollow noreferrer">Michaels Link </a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload