I have an app which has tasks in it and you can reorder them. Now I was woundering how to best store them. Should I have a colomn for the ordernumber and recalculate all of them everytime I change one? Please tell me a version which doesn't require me to update all order numbers since that is very time consuming (from the executions point of view).
This is especially bad if I have to put one that is at the very top of the order and then drag it down to the bottom.
- Name (ordernumber)
--
- 1Example (1)
- 2Example (2)
- 3Example (3)
- 4Example (4)
- 5Example (5)
--
- 2Example (1) *
- 3Example (2) *
- 4Example (3) *
- 5Example (4) *
- 1Example (5) *
*have to be changed in the database
also some tasks may get deleted due to them being done