I want to create a database that keeps track of a list of tasks that the users need to do and in the list of tasks there will be subtasks and sub-subtasks and so on. So my question is how to design this kind of database?
Example: A picture of the tasks and subtasks
For this kind of database, should I create only 4 tables for the main task, sub task, sub-subtask and sub-sub-sub task or is there a better way of doing it? What if the users want more subtasks? Should I create a fifth table or should I just restrict the number of subtasks available. I feel like having this many tables in a database just for the subtasks is a bad database design
Turn an existing task into a sub-taskHover over a task. Click and hold the gray handle that appears to the left of the task. Drag it from left to right to adjust its sub-task level.
But sometimes, a task has multiple components, or multiple contributors. You can't add another assignee to the same task—but you can create subtasks. Subtasks can be a powerful way to distribute work and split tasks into individual components—while staying connected to the overarching context of the parent task.
Right-click a task and select Add a subtask. Under the main task, add a new task and press Ctrl + ] (Windows) or Command + ] (Mac). Next to the main task, click Edit. and in the Add subtasks field, enter a task.
A task represents work that needs to be done. A subtask is a piece of work that is required to complete a task. Subtasks issues can be used to break down any of your standard issues in Jira (bugs, stories or tasks).
So you have basically a tree of tasks. It should be possible to add a foreign key column to the task entity that references it's parent task. The nesting can be as deep as you desire and there is no need for subtask tables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With