|
Post by account_disabled on Dec 25, 2023 23:37:36 GMT -5
Using soft delete we can see even if the user deletes it shortly after adding it. In addition we may use the deleted data for application development purposes. If our application learns user behavior even if the user decides to delete his account his activity can still serve as another learning sample for our application. What about the disadvantages Soft delete in my opinion has two main disadvantages. First of all we store data that we will probably never use which wastes disk space. There is a very small chance that someone will want their data back. The second issue is legal issues. Please Phone Number List note that by law you have the right to request the actual DELETION of your data from the database. In an application that is used by a small number of users this is not a problem because you can delete such data manually. The problem begins to appear in large applications where we can receive hundreds of such reports. In such a case we are forced to create methods for classical user removal. soft delete destroyed notes Let's get down to practice I will show the operation of soft delete on the example of an application written in Node.js Express.js and using MongoDB. The library used to communicate with the MongoDB database is mongoose. I will use the package to handle the soft delete mechanism mongoose delete. First of all at the very beginning we need to install the previously mentioned package.
|
|