Currently, with all the recent events — data privacy is one of the most hottest topics in the world. Apple is investing billions of dollars fighting for the privacy of their consumers, while companies which can't afford to — just give in. One thing is government requests (which are becoming more ridiculous each day), while another — hackers.

The target of this article is to show off several scenarios that represent how the data you create… stays forever. Even if you delete them from the sites and services you've decided to stop using.

By looking back at not so long ago, typical database structure would look something like this:

Containing basic user information like their identification number (`id`, which mostly increments with each user), username, e-mail, hopefully a encrypted password, whether the user is confirmed (1 stands for yes and 0 for no), when the user is created (registered) and updated (last changed his data). Nothing complex, and deletion also happens with simple command like DELETE FROM `users` WHERE `id`=(int)X. That was it and your data were removed from the database for good.

Nowadays it's a bit more different. Now imagine if there would be also a field just like `confirmed` which with 1 would represent yes, that the user is confirmed and 0 would stand for no, he's not. Just in this case — the field would be named `deleted`, with the completely same principle. With 1 saying that yes, you're deleted, and 0 showing that you're active. To make it more insightful for the developers, the field could (and nowadays mostly is) `deleted_at` containing the time of deletion, or being NULL if you're active. Pretty much looking like this:

So what the system understands from this is to not show your profile and anything from you publicly, but the data — they're staying in the database untouched, available for anyone with access at any time.

Lets take another bit more complex example from the real world. Some of you might be familiar with community based site called reddit. Users can create their posts, share content and the most upvoted ones get to the top — in the eyes of others. When you create a post, you have a possibility to delete… not it, but yourself as the author of it. That would look something like this:

Content (including comments) stays untouched and continues living happily, only the creator can't be seen anymore.

I'm not completely familiar with Reddits privacy policy, but as far as I know it's pretty fair towards the users. So lets assume that there isn't a `dont_show_username` field set to 1, but the `user_id` (which would represent the author of the post) is really removed (as in, set to NULL). No way retrieving the author now, right? Wrong.

See how on the left side between upvote and downote buttons there's number representing its result? It's currently 1. Although it doesn't mean there's only 1 voter, but the first voter almost always will be the creator of the post.

There are many lessons here, each one of you will take out different one(-s). The main thing we're suggesting here is to be as aware in digital world, as in the real one. Keep safe!