C# SQL Server - save information about user on item when user has been deleted -


i have database need advice on how proceed in situation. assuming have table called tasks. each task has property called createdby need store information user created task.

i can store example id of user , when fetch task fetch info user specific task createdby field value john smith example instead of id. far. or how should handle scenario let's user john smith has been removed/deleted system , task still exists, how show name of user created task? still need show john smith in there rather id.

in situation, use 'soft deletes' user table. add column user table , name 'active' default value of 1. when wish delete user, set value 0. allow continue enforcing referential integrity users.


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

swift3 - Value of "String" has no member 'indices' - moving to Swift 3.0 -