such as a table A
create table A(,
id int NOT_NULL AUTO_INCREMENT,
is_deleted tinyint(1) NOT_NULL DEFAULT 0,
PRIMARY KEY (id)
)
It uses the is_deleted column instead of the delete statement
But there is another case, which is to put the deleted data into a separate record table ARecord
create table ARecord(
id int NOT_NULL AUTO_INCREMENT,
delete_time datetime,
PRIMARY KEY (id)
)
The deletion here refers to the deletion in the macro sense. i.e. expired, invalid, graduated, dismissed. Essentially a huge drop in lookup frequency
So what are the use cases for these two? When to use column? When to use table?