Eli5 how is data deleted

403 views

Like where does it go?

In: 3

12 Answers

Anonymous 0 Comments

Data is stored in databases on a server. If data is removed (for instance a user account), it means that it is deleted from that database.

Anonymous 0 Comments

In modern computers, nothing is actually “cleared” when things are deleted. Rather, the reference telling the computer *where to look for that information* is deleted.

It’s like ripping up the post-it note with your ex’s phone number or address. The phone number would still get you to them (if you knew it), and their house hasn’t disappeared. But because you don’t have the note telling you where to look, in a sense, they’re gone *(assuming you don’t memorize it / know where they live by memory)*.

Anonymous 0 Comments

You can buy a blank book, a pencil, and an eraser. When you write in the book, you put a note in the table of contents:

p2. “Recipe for grandma’s lasagna,”
p7. “Grandma’s will,”
p. 14″Grandma’s horrible secret.”

As long as you have an item in the table of contents, you know you won’t write on that page again.

But let’s say you decide you don’t need to keep Grandma’s Will anymore. So you erase its listing on the table of contents. Now if you go back to the table of contents, you won’t see it anymore. And NEITHER WILL ANYONE ELSE. So now it might still exist, somewhere, but where? And who the hell cares? You’ve decided you don’t need it anymore. Maybe you can find that page by accident, but enh, that’s not really something to worry about unless you REALLY want to hide that page.

The next time you write in the book, you’re looking for a page you can write on. You find the page with grandma’s will on it. But it doesn’t matter, it’s not in the table of contents. So go ahead, grab that eraser, rub out the will, and write on the page.

That’s how file deleting works. You can think of a file as being a page in a book, and when the computer doesn’t need that file anymore, it erases the line in the table of contents. And if the computer wants to write over the pages (or, in this case, file sectors), if it doesn’t see an item in the table of contents protecting that file sector, it will happily write new stuff there.

EDIT to add:

Imporant to remember, though, that if the computer doesn’t write over that file sector, the contents – the words on the page – are all still there. So a determined person can certainly find Grandma’s will again. Just like in your book, until you actually erase it and write over it, it’s still there; it’s just not in the table of contents. Same with computers. The data might not be registered in the file management system, but it’s all still there until it gets overwritten by something else.

Anonymous 0 Comments

Most of the time, it doesn’t go anywhere. Typically, the computer gives the data a mark that tells it two things: it shouldn’t display the data anymore, and it’s okay to write over the data with something else if it needs extra space. But other than getting that mark, nothing actually happens to the data until it actually gets written over. This is why it’s sometimes possible to un-delete data: if it hasn’t been written over yet, it’s still there.

This also marks the difference between deleting data and *wiping* data. A data wiper first deletes data in the usual way, but then it immediately goes back into the data and writes over it (usually just with a repeating pattern, but the really good ones overwrite it with random junk). That way, the data cannot be recovered easily, because it’s actually gone: something else is there now.

If you want a historical metaphor, back in the days of writing on parchment in ancient monaateries, the actual parchment was very expensive. To save on costs, monasteries got into the practice of scraping the ink off of old parchments they felt were no longer needed, then writing on the now-blank parchment again. A parchment that used to hold one document but now holds another is called a *palimpsest*, and in some ways this is like deleting old data and writing over it.

Anonymous 0 Comments

Data is hardly ever fully deleted unless you actually destroy the server/hard drive/whatever storage that it’s on, and even then it might not be, just inaccessible. Usually though data is just overwritten with more data or you tell the drive (which is binary at it’s base level) to turn all the 1’s in a sector to 0’s, which is essentially clearing it.

Anonymous 0 Comments

First, you need to understand what data is. Data stored on computers and phones is digital information comprised of a bunch of ones and zeroes (called bits) that are recorded using a variety of methods ranging from magnetic charges (hard drives, floppy drives, magnetic tape), pits etched into a surface/substrate (CDs/DVDs/Blu-Rays), or even electric charges inside of a transistor (SSDs).

You also need to understand how these digital bits are arranged to form a piece of data like a file or a database and what technique is used to “delete” them when such a command is issued.

In the case of files on a storage device like a hard drive, flash drive, or SSD, a file is a bunch of bits (known as storage blocks) that are stored on the device and a special set of files called a directory is updated to remember which blocks belong to which file and where they are on the storage device. When a file is deleted through an operating system, the directory entry for the file is simply removed and the blocks of bits that comprise the file are left in place. But since there’s no longer a record of them being used, they’re free to be overwritten by the next file that needs to be saved.

Databases aren’t much different. There are other ways they’re organized called pages and records. And there’s an index that tracks where each record is. When a record is deleted, many database systems leave the record in place and delete the index entry much like files on a drive are deleted. Often, database owners will run a cleanup command to re-write the data in a database to remove these unused records to optimize performance.

Other mediums like tapes and re-writable optical work similarly even though their structure is quite different.

As you might surmise, there are points in time after which data has been “deleted” that it might still be recoverable because only the directory or index of the data has been removed. This is true and specialized data recovery software can do just that.

Even on drives that use encryption, deleted files can be recovered if the drive has been unlocked using its encryption key.

Some operating systems include a secure erase option that overwrites the deleted files with random data to make recovery impossible.

When discarding a storage device that you want to make sure can no longer be recovered, it is important to use a wiping tool to overwrite the entire drive with random bits and/or zero it out with empty bits. Alternatively, if the drive was encrypted, erasing only the key stored on the drive will make it effectively unreadable with today’s technology.

Anonymous 0 Comments

Think of data like thousands of labeled boxes in your garage.

Soft deletes remove the label from the boxes, the data is still there but it’s hard to find. (This is very simplified)

Full delete either removes the contents of the box and incinerates it, leaving the box empty… or replaces the content of the box, relabels it, then incinerates what used to be in the box.

Another simpler way to think of data is basically a whiteboard which can be erased. Data is just instructions written on billions of mini erasable whiteboards.

Anonymous 0 Comments

I’ll throw my hat in.

Modern computing devices use addresses for the data. The operating system don’t know where the data is physically on the storage media, just the address so it can tell the storage media I want what’ at this address and the controller on the storage device knows where that is. For the sake of the explanation, we can make abstraction of this.

You can think of these addresses like street addresses. Basically, the operating system of the device “knows” where the data lives and that someone lives there, so it won’t have other data “move in” at that address.

When you delete data, it basically marks up the address as free and that new data can move in. It won’t necessarily get the old data to move out.

On a good old hard drive, that’s how it works. The old data is still living at that address and doesn’t move out until new data is told to move in. Now, if you want to make sure the data has moved out and is no longer there, you can write new data that doesn’t mean anything at that address. New data moves in, old data moves out. Now, that can leave some traces. Think of it as the old data moved out, but their furniture, belongings, etc. are still at that address, so it might be possible to figure out what the data was. That’s why to truly delete data on a hard drive, you write multiple passes of random data to make sure any traces of that data are no longer at that address. Of course, demolishing the drive would be like demolishing a house, it’s gone for good.

Solid state storage works a bit differently. SSDs have better performance if there is no need to overwrite data. That’s why something called garbage collection happens. Think of it as someone going through the neighborhood and making sure that addresses where data was told to move out are actually empty. It will make those addresses empty if it finds that it should be empty. There’s also something called a secure erase which makes the drive entirely empty.

Some other media like CDs can be write only and you can’t delete data from it. You can always physically destroy the CD to delete data.

Anonymous 0 Comments

The data doesn’t move to anywhere. The information WHERE the data is, will be deleted and with time, the data itself. Let me visualize:

Imagine a simple non-filled rectangle on a white background. You draw lines inside this rectangle vertically and horizontally with regular spacing. What you have now inside the rectangle is a grid of many little squares. The little squares are the “data cells” for your renter called Bits, basically like their own homes where they live in happily.

Let’s say a new bit arrives at your rectangle and ask him _”Hey, I find this city very nice and want to save myself somewhere, can you tell me where I find the next free data cell to live in?”._

So how can your rectangle solve this problem for his citizens? How can he keep track of which data cell is free for rent and which is occupied by a bit already?

Approach B.a.D would be to knock on every single datacell he has inside him to find out. In our case we drew 300.000 cells and since all cells look the same and for heaven’s sake he can’t remember the status of every 300.000 houses he has to knock by 1 to end for every. Single. New. Citizen. Especially since these pesky Bits believe in index numbers so they are randomly spreadout

Well the simplest approach would be to *mark* every data cell in two colors, let’s say red and green. Green stands for “you can enter this home” and red stands for “someone lives here, don’t come in.”
With bookkeeping our rectangle can and will always keep track of every datacell and can respond to every new Bit where he can start his new life.

Now If a bit has enough and wants to leave our rectangle city he soon will find out that he actually can’t. The reason for this is in physical nature but to simplify it for this visualization we could say that once a bit created his own world in his data cell, it would take too much time and energy to bulldoze it clean. So instead our rectangle simply marks the datacell of the upset Bit green -free to enter.

If a new bit arrives for a home Rectangle looks at his book and sends him to the green datacell of angry bit. New bit arrives at his cell and simply eats angry bit bitwise. He immediately destroys everything angry Bit created and builds his own life.

Now the time between when we put the “For sale” sign up to a new bit entering our city and wanting or giving him the exact datacell could last months or years and for the entire duration our upset (and captivated) bit is still inside that data cell, still pissed,

If you would ask our rectangle about that particular datacell however he would look at his book and respond that it is empty because he marked it green 2 years ago and he is very sure that there is nothing and wouldn’t bother to knock.

_Does the one particular tree exist in a forest, if you never saw it_?

Anonymous 0 Comments

simplest explanation I can think of.

You know how people say data is “1s and 0s”?

What really means is data is a huge bunch of switches that are either up or down, on (1) or off (0).

Ok, so imagine a big board with like, 100 little light switches on it.

The switches make a code.

first switch up position is A.

Second switch up is B.

First and second switch BOTH up is C.

So on and so on. I can do different combinations of the switches being up and down, and that represents something in the computer code.

Whatever my switch combination is, that is the “data”.

So what if I erase all the data? Where does it go?

(we’re going to talk about actually erasing the data “zeroing it out” not just “deleting” it, clearing a table. That’s complex, ignore that)

Ok, so when I erase the data, I’m actually just resetting all the switches back to the “0” position.

Now, did the data “go” anywhere? The switches didn’t go anywhere.

All 100 switches are still on the board right?

But they no longer represent what they used to, because their coded message has been reset.

“WHATEVER THIS DATA WAS” has just been replaced with

“000000000000000000000000000000000000000”

on the code board.