I am working in a project where database items are not deleted, but only marked as deleted. Something like this:
id name deleted --- ------- --------
For a simple table called [Test] with columns ID(int), Filter(nvarchar), Deleted(bit)
ALTER TABLE [dbo].[Test] ADD CONSTRAINT [DF_Test_Deleted] DEFAULT (0) FOR [Deleted], CONSTRAINT [IX_Test] UNIQUE NONCLUSTERED ( [filter], [Deleted] ) ON [PRIMARY]