Am 06.06.2013, 23:36 Uhr, schrieb Michael Bayer <[email protected]>:


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.

I understand that I just wonder whether every thing has a favourite or not, in which case the structure is not fully normalised and that is how I would do it because it makes the projections easier. Well, to my mind at least. And, wouldn't it resolve the join problem?

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

--
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