🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 2 Min Lesezeit
0

Hard Delete Vs Soft Delete in DBMS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

When working with databases, we often need to remove records. There are two common approaches for deletion: hard delete and soft delete. Let’s explore these concepts in simple terms with a real-world example.






Hard Delete



A hard delete means permanently removing a record from the database.

Once deleted, the data is gone forever and cannot be retrieved.



Real-World Example:

Imagine you have an email inbox. If you delete an email and then empty your trash folder, that email is permanently removed. You cannot restore it anymore. This is an example of a hard delete.



How It Works in a Database:



When you perform a hard delete, the database removes the record completely:




CODE
DELETE FROM Users WHERE id = 101;






This query deletes the user with ID 101 from the Users table, and the data is no longer available.






Soft Delete



A soft delete means marking a record as deleted without actually removing it from the database. This allows you to "restore" the record later if needed.



Real-World Example:



Think about your recycle bin on a computer. When you delete a file, it goes into the recycle bin instead of being permanently erased. You can still recover the file until you permanently delete it from the recycle bin. This is similar to a soft delete.



How It Works in a Database:



Instead of removing the record, we add a flag (usually a column like is_deleted) to mark it as deleted:




CODE
UPDATE Users SET is_deleted = 1 WHERE id = 101;






The record is still in the database, but the is_deleted column indicates it should not be shown in normal operations.



To retrieve only active records, you add a condition in your query:




CODE
SELECT * FROM Users WHERE is_deleted = 0;






When to Use Hard Delete




  • When the data is no longer needed.

  • For sensitive data that must be permanently erased (e.g., user passwords).



When to Use Soft Delete




  • When you want to maintain a history of data.


  • For audit logs or when users can undo deletions (e.g., social media posts).


Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Hard Delete Vs Soft Delete in DBMS

Thematisch verwandte Begriffe: Hard, Delete, Soft, DBMS · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...