Q:

How to arrange delete process in project

I have big project where I need to arrange delete of several things like clients, orders, products etc. But theres a point that I need to make an archive for restoring.
So which solution is best.
I have researched and some my ideas were not successful.
1. First was make all rows with status is deleted. But it makes problems in selections and making program work slow.
2. The idea was making separate tables for deleted items but it made problem in orders point as I couldn't manage relations between not deleted orders and deleted clients and products.
Please if theres some ideas how can it be solved ping me.

A:

Well your first idea is kind of the best here. It should'nt make that big kind of problems in selection as you always got the WHERE parameter aviable (though this will take some time and work). Its most easy to restore all of your data then.
And well it shouldnt really slower your programm as databases are build to handle big numbers of data. You should look to optimize your queries first, thats mostly the problem. But like i said your first idea was a good way you were heading

