On Jun 6, 2013, at 5:40 PM, "Charlie Clark" <[email protected]> wrote:
> 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? can you show me the alternate design you have in mind? I'm not sure what "normalize to favorites with strict 1:1" looks like. this is all just my own curiosity. the issue at hand is something different. -- 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.
