The application should records some tasks occurrence in the Database. The question is: Save or update the task first then perform the task, or perform the task first then save or update to the Database?
Logically, I bit that doing the task first and then save to the database is better. However, in transactional environment which should offer rollback mechanism to the database, I think doing the task under the cover of transaction is better, i.e. Update first then do the task!
What do you think about this?