[thelist] Representing tasks in the database

Matt Warden mwarden at gmail.com
Thu Apr 26 13:17:43 CDT 2007


On 4/26/07, Joel D Canfield <joel at streamliine.com> wrote:
> > this representation does
> > not keep you from doing something stupid
>
> and a good design should prevent that. got it.

Not necessarily. I was just pointing out that extra care would be needed.

> so, what's a good db solution? now I have to know, 'cause I know I'll run into this.

I think the solution presented is the best general solution ('general'
as in not knowing the business specifics of the task at hand). If you
were just trying to avoid this circular precedence issue, you could
move from the pointer solution to an ordering solution.

task       order
1              0
2              0
3              1
4              2
5              2

Task 1 and 2 can be done in either order. Both must be done before 3.
Three must be done before 4 and 5, but 4 and 5 can be done in either
order. This particular representation does not allow for the circular
precedence problem.

-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list