当前位置:网站首页>Use soft delete to delete data in database
Use soft delete to delete data in database
2020-11-10 11:27:00 【Oc ct0tt1c】
One . Soft delete ( Logical deletion ):(Soft Deleting), That is, when the data in the data table is deleted , It is not removed directly from the data table , It's marked as deleted , That is to set a delete field in each table ( Such as :IsDeleted) etc. , By default, the value is 0, And undeleted state ; When you need to delete data , Update this field to 1.
In reality , What we mean by deletion is not really deletion , Often we delete some data in the database after , It's hard to recover , In this way, it will be more convenient to use soft deletion to check again .
for example :
- company “ fire ” An employee , Instead of deleting employees ;
- company “ Cancel ” The order , Instead of deleting the order ;
- company “ Discontinue use ” A device , Instead of deleting a device ;
Here we're going to use dismissal , Cancel , Stop using instead of “ Delete ”;
When you want to see the data status again , As long as IsDeleted To change the value of 0 that will do .
Two . Hard delete ( Physical delete ): Really delete data from the database , The data disappears .
版权声明
本文为[Oc ct0tt1c]所创,转载请带上原文链接,感谢
边栏推荐
- He doubled the fluency of the long list of idle fish app
- Express learning notes (MOOC)
- 刷题到底有什么用?你这么刷题还真没用
- 专业之旅——GitHub 热点速览 Vol.45
- Camtasia处理音频制作BGM
- Notes on Python cookbook 3rd (2.4): string matching and searching
- centos7下xfs文件系统的备份和恢复:完全备份,增量备份,差异备份
- How to generate random data for interface testing
- Android network performance monitoring scheme
- STATISTICS STATS 380
猜你喜欢
随机推荐
2020CCFBDCI训练赛之室内用户时序数据分类baseline
ABP框架中一对多,多对多关系的处理以及功能界面的处理(1)
[technical course] peerconnection in webrtc self built by visual studio 2017_ The client program reported an external symbol error that LNK2019 could not resolve
2020-11-07
如何更好地理解中间件和洋葱模型
idea提交SVN忽略文件设置
Data structure adjacency multiple table (C language implementation)
Api: tiktok: Video Review List
一不小心画了 24 张图剖析计网应用层协议!
深入浅出git(一)——数据模型
C + + STL container
Android network performance monitoring scheme
Android网络性能监控方案
LeetCode:数组(一)
Come on! Hungry? Software testing Python automation post core interview questions out, how many will you come down the whole process?
STATISTICS STATS 380
LeetCode:二叉树(四)
[C.NET] 11: the most basic thread knowledge
Class loading process
LeetCode 5561. 获取生成数组中的最大值



![[C#.NET 拾遗补漏]11:最基础的线程知识](/img/5f/3db6e0620191da4893ad7b4e2ba064.jpg)



