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
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.
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? :)
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 :).
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. :)