I’m designing a user table for my current project. I want to add a column to user table where I can store information whether user was deleted or not. I’m thinking about adding only one datetime column so if date is set that means user was deleted at this date and time. Other common approach is to add additional deletion flag 1 or 0. Do I need deletion flag looking at it from performance/scalability perspective?
Share
I would add the deleteFlag and also a lastUpdate column. Whenever the deleteFlag value changes you can set the lastUpdate column to
NOW(). So you will know if the user is deleted/undeleted and when. Adding two such columns should not affect performance.