SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Which to do?
-
Apr 13, 2002, 21:24 #1
- Join Date
- Oct 2001
- Location
- Whistler BC originally from Guelph Ontario
- Posts
- 2,175
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Which to do?
Well I have a dilema. I have created a task/project manager and have just been asked to add a feature. As far as I can see I have two choices. (really I should have thought of this when I started but i didn't come to mind)
I have a current table
taskid pk
tid fk
taskname
taskdesc
tasknotes
etc...
Now I think I can do two things
1 - create a lookup table and simple add an option to create recursive tasks. This means there would be no changing the original table. Simply adding a new table with a foreign key to the recursive rules.
taskid fk
recid fk
RECURSIVE
recid pk
rules...
2 - Add another column to the original table connecting it to the Recursive table detailing the rules.
Now for all legitimate purposes I don't really need the lookup (my boss doesn't require future editing of the tasks as of yet) but I am trying to make it so when the time comes and he wants to edit when how or where the recursive tasks fall there is a table tracking the proper information which can then edit the appropiatr tasks.
So I am wondering what others would do in a situation like this. Which would seem the best option?Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.
-
Apr 15, 2002, 04:59 #2
- Join Date
- Jun 2001
- Location
- Newcastle, England
- Posts
- 268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'd probably go for the lookup table, personally. What happens if a task needs to relate to two sets of recursion rules (I don't know what your rules table is like, but say for example you had a task to be performed every day, then in the future that changes to once a day on Mon, Wed, Friday and twice on the other days). And of course, a new task may be added which needs exactly the same rules as an existing task. Having a lookup would make it trivial to add extra recursions. (As I say, maybe your recursion rules table already allows for this?)
I can't see that there's anything wrong with the lookup table, unless you're 100% certain that you'll always have a one-to-one or one-to-many relationship (and never a many-to-many). In that case I'd consider changing the table, depending on how much work it would take.
Sorry if that isn't very clear - basically I'd say it depends on the future of the project, which you're better-placed to imagine than I am.
-
Apr 15, 2002, 23:14 #3
- Join Date
- Oct 2001
- Location
- Whistler BC originally from Guelph Ontario
- Posts
- 2,175
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
And thats exactly what I wanted was another perspective. Thank you. I will do the lookup table simply because it allows for more scalability on the application.
Maelstrom Personal - Apparition Visions
Development - PhP || Mysql || Zend || Devshed
Unix - FreeBSD || FreeBsdForums || Man Pages
They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.
Bookmarks