Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: difficult design question
meislerj_at_yahoo.com wrote:
: I have a design question I've been tossing around, but can't seem to
: come up with a good solution. Basically, I have a work item. Each
: work item can have one or more assignments. Or, it could have one or
: more "groups of assignments". Or, it could have a combination (that
: is assignments and groups of assignments). Each assignment in turn
: could have as its children one more assignments and / or groups of
: assignments, etc.
: Also, it is important to note, a work item could have 0 groups and 0
: assignments. That is, it doesn't need to have any children. Each
: group must have at least one assignments within it. Also, it is
: necessary to keep track of the "parent assignment" for each
: assignment, even if the child assignment is part of a group.
: So for instance:
(I am using a non-proportional font, and have changed the spacing to work for me.)
: Work item
: |
: ----------------------------
: | | |
: GP1 AS1 AS2
: | | |
: ---------- GP2 AS3
: | | |
: AS4 AS5 -------------
: | |
: AS6 AS7
A work item is just an assignment that has no parent.
There are no groups. A "group" is simply a bunch of assignments that have the same "group number" as an attribute.
create table stuff_to_do
(
this_id number not null parent_id number (can be null, but FK says must be in stuff_to_do) group_id number (can be null) task_dsc varchar2(100) assigned_to varchar2(100) due_by date etc yadayadayada
$0.10 Received on Wed Nov 28 2007 - 01:01:10 CST