On Wednesday, July 30, 2014 12:18:03 PM UTC-4, Michael Bayer wrote:
>
> Typically a UNIQUE constraint is placed on the “natural” key to prevent 
> dupes. 
>

Sidenote on this:

If the field isn't case-sensitive, then you are often better off using a 
function on the constraint if the database allows it.  

Works perfect on things like email addresses under Postgres:

    CREATE UNIQUE INDEX ON email_address(lower(address));





-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to