mysql - better way to mark deleted entries in RDBMS -


I have to keep records for organizations in my RDBMS, even if a user removes some unit from the front That I have a user table where each user has a unique email now, with an email name1 was an email email1 . Now that user's record has been removed from the front and any user tries to create a user with name2 and email email1 . This will violate the unique barrier on the email column, but I have to keep that record in that table, so in my table is the status column with the default value 1 . Now I have a unique barrier at email and status whenever a person deletes the user, then I raise the position from 1. But this is the problem, where a user record with email email1 is destroyed twice, in that case I will have 2 user records with the status 2 then this method failed Another way is to move a deleted record in a separate table, which does not have any kind of obstruction. But using this approach, I need an extra table for each table for which I need to keep track of deleted entries. So I find it stupid? Any other way to solve this problem?

I would recommend using the timestamp column instead of the number of stores to be deleted because the time The information is usually also known as a temporary model and generally uses two timestamps to define the validity gap, the anchor model has expanded this model with special concepts: anchors, tires, Not, specialty All floating models Astw are many problems in the implementation of regular RDBMS, SQL this problem in 2012, but it has not been implemented widely in the mean time and RDBMS vendors that offer very different solutions changing data capture or flashback.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -