August 5, 200718 yr I've got a design question here. I'm tracking donations, which can come from either Individuals or Groups. A donation consists simply of a date and a dollar amount (and maybe check number). I think that Individuals and Groups belong in separate tables, but that Donations are donations, whether from an individual or a group, and thus should be in a single table. A Donation should link back to the entity that gave it, either Indiv or Group. The relationship from both Individual and Group to Donation is one-to-many (although any single Donation has exactly one donor). I want the user interface for entering donations to be as simple as possible, hiding from the end user the distinction between individual and group wherever possible and "reasonable". I don't know if it's easier, for example, for the data entry person to work with a single list of merged Group and Individual names, or to keep those as separate lists. That sort of thing. I'd appreciate some guidance with this problem! Thanks, Chap
August 6, 200718 yr Individuals and Groups probably belong in the same table, "Donors" with a field for "Type" (which can be Individual or Group).
August 6, 200718 yr Author Individuals and Groups probably belong in the same table, "Donors" with a field for "Type" (which can be Individual or Group). Thanks, David. To make sure I understand you, are you suggesting an additional table (Donors) that is parent to multiple Donations, and that refers back to either an Individuals record or a Groups record, depending upon the Type?
August 7, 200718 yr I hadn't intended it that way. I meant combine the two tables, Individuals and Groups, into one table, Donors. But if the two tables are sufficiently different I think your interpretation might work. It depends on why you think they should be separate, but think the former will be easier.
August 12, 200718 yr But as such are individuals usually participants in a group as well: http://jonathanstark.com/recursive_data_structures.php ...it's just if the groups here fit each individual? Otherwise make an attribute to distinguise them - but this have already been suggested. --sd
August 12, 200718 yr Author Soren, Thanks for the link! Very useful. In my case, the individuals and groups are not related in the way you speculated (i.e. neither parent/child, nor recursively). They have almost no fields in common beyond a mailing address. I can't see combining Indivs and Groups into a single table, but I think I will define a table "Donors" that has a one-to-one relationship with Indivs and Groups and contains a certain amount of (redundant) info, like mailing address, from its related Indiv or Group record. A Donors record will be parent to multiple Donations records.
Create an account or sign in to comment