There is a good practice: don't delete anything :) Mark it as "deleted" instead.
Because WHY? Show us a real business requirement to physically delete stuff? Not only it slows things down (usually DBs lock a lot while deleting), causes fragmentation, etc., but in most of the cases it is absurd! No business would allow you do physically delete a customer and a list of orders!
Business does not delete anything. In the real business no one will go an find all the papers related to a particular customer and dispose of them in a shredder. Unless they did something illegal and FBI is knocking at the door :)
Talk to your business experts who know a little about computers (these are the real business experts). They will tell you what happens to customers when they stop being customers (perhaps they are "archived", perhaps something else, or perhaps just nothing) and then model it. It is us, programmers, usually invent the concept of "deleting" stuff.
Besides, analysing historical information can be really helpful some time in the future!
There are only two options when physical delete can be necessary:
- To save disk space (which is not a problem anymore when disk space is as cheap as dirt)
- To have some legal obligation to physically delete data when customer wants it to be deleted (which is a very rare requirement and usually is met in a certain domains).
For #1, again, space is not a problem these days so implementing delete can cost more than benefit from it. For #2 you want to be explicit anyway and you would probably manage your data storage differently. For example you may want to have a DB per client then so you can just drop the DB and all the backups to comply to the regulation (yes, you must remove backups in order to legally say that you don't hold the deleted data anymore)
So which case is yours? Why you want to delete, what are you real business requirements?