0

I'm actually working on a webApp, and i want to simulate the TRASH concept, so each element deleted from the application will disappear, but remain for the administrator in the trash area so he can confirm its deletion.

I've suggested to add an attribute IsArchived with the Boolean type, so it can indicate if the element is deleted or not, but it appears that this method is old fashioned, and I think that it will deteriorate the performances of the app ... so is there any paradigm or method I can use to simulate this principle and optimizing the performance of the app ?

PS : I'm Using MYSQL as a database.

TheByeByeMan
  • 1,396
  • 2
  • 28
  • 50

1 Answers1

2

I don't think there is something wrong with having deleted attribute in the table of your elements, seems to me like the easiest and most efficient way. You could also create a duplicate table of your elements and move the deleted ones here, this really depends on the case. But I would gor for number one, recycle bin seems to me as a good use case of soft-deleting because otherwise you would be moving rows from one table to another all the time.

Petr Mensik
  • 26,874
  • 17
  • 90
  • 115