On Jun 6, 2013, at 5:18 PM, Charlie Clark <[email protected]> 
wrote:

> Am 06.06.2013, 20:21 Uhr, schrieb Andy <[email protected]>:
> 
>> 
>> IOW I have things and groups.  The rel table is a many-to-many relation
>> between things and groups.  A thing also may have a favorite group; if so,
>> there has to be a rel between that thing and its favorite group.
> 
> Are favourites optional? Why not normalise to Favourites with strict 1:1 with 
> things and groups?

by putting the FK constraint to the composite primary key of "rel", it 
guarantees that the "favorite" item is a member of the thing->groups collection.




-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to