Am 07.06.2013, 00:05 Uhr, schrieb Michael Bayer <[email protected]>:

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.

Well, I guess I asked for it. Pseudo-tables

things (
thing_id SERIAL PRIMARY KEY
)

groups (
group_id SERIAL PRIMARY KEY
)

groups_things(
thing_id INTEGER FOREIGN KEY REFERENCES (things.thing_id),
group_id INTEGER FOREIGN KEY REFERENCES (groups.group_id)
)

favourites (I'm a limey) are just another relation.

favourites(
thing_id INTEGER PRIMARY KEY FOREIGN KEY REFERENCES (things.thing_id),
group_id INTEGER FOREIGN KEY REFERENCES (groups.group_id)
)

Depending on how you look at it, favourites are just another relation and could have additional attributes like "colour", or simply behave like a sub-class of groups.

Am I missing something big in the original question as to why this isn't a reasonable solution?

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