Data Model:
Aaron Watters
aaron.watters at gmail.com
Sun Apr 12 22:46:34 EDT 2009
On Apr 12, 10:14 pm, Anthony <alantho... at gmail.com> wrote:
> I'm struggling on whether or not to implement GroupItem (below) with
> two separate models, or with one model that has a distinguishing key:
>
> Given:
> class ParentGroup:
> a group of values represented by class GroupItem
>
> class ChildGroup:
> a group of values represented by class GroupItem
> foreign-key to ParentGroup (many Children sum to one Parent)
>
> Option A:
> class GroupItem:
> foreign-key to ParentGroup
> foreign-key to ChildGroup
> GroupItemType in (ParentItem, ChildItem)
> value
> value-type
>
> Option B:
> class ParentGroupItem
> foreign-key to ParentGroup
> value
> value-type
>
> class ChildGroupItem
> foreign-key to ChildGroup
> value
> value-type
>
> What are my considerations when making this decision?
>
> Thanks!
It looks to me that the two designs
might be useful for different
purposes. What are you trying to do?
-- Aaron Watters
====
whiff.sourceforge.net
http://aaron.oirt.rutgers.edu/myapp/root/misc/erdTest
More information about the Python-list
mailing list