title: Database schema for task management
body: <p>I have to manage a to do list and I'm searching for the best way to implement it in my MySQL database.</p>
  
  <p>My to do list is like the following</p>
  
  <ul>
  <li>Pre-op
  <ul>
  <li>Task1</li>
  <li>Task2</li>
  <li>Task3</li>
  <li>Task4</li>
  </ul></li>
  <li>Receipt images and data
  <ul>
  <li>Task1</li>
  <li>Task2</li>
  </ul></li>
  <li>...</li>
  <li>...</li>
  <li>Post-op
  <ul>
  <li>Task1</li>
  <li>Task 2</li>
  </ul></li>
  </ul>
  
  <p>I was thinking to build my schema like this : </p>
  
  <pre><code>*************
  *** steps ***
  *************
  id_step 
  name_step 
  
  1|Pre-op
  2|Receipt images and data
  3|...
  8|Post-op
  </code></pre>
  
  <hr>
  
  <pre><code>*************
  *** tasks ***
  *************
  id_task 
  name_task 
  
  1|Task1
  2|Task2
  3|...
  8|Task56
  </code></pre>
  
  <hr>
  
  <pre><code>****************
  *** todolist ***
  ****************
  id_todolist 
  step_id 
  task_id
  state 
  
  1|1|1|archived
  2|1|2|current
  3|...
  x|8|56|current
  </code></pre>
  
  <p>Am I doing it right ? Or is there a better Way to proceed ?</p>
  
  <p>The differents tasks are unique. And finally I'll have at least two lists like that. </p>
  
  <p>I manage surgical procedures. Currently two patents were filed. So two different ways of managing an operation. In the future, we can imagine that other patents will be filed.</p>