title: Database design for a list of task with subtask
body: <p>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?</p>
  
  <p><strong>Example: A picture of the tasks and subtasks</strong></p>
  
  <p><a href="https://i.stack.imgur.com/18UXH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/18UXH.png" alt="a picture of the tasks and subtasks"></a></p>
  
  <p>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</p>