473,765 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Physically deleting row data

Hi all,

I have a client that is obsessed (actually paranoid) with security.
One requirement he has is that any data deleted from a database be
physically removed. This means not only within the scope of the
database itself, but at the file level itself.

For example, if a row in a table has a value of "foobar", and that row
is deleted, then the string "foobar" must not be found within any of
the database files, or even on the disk. If someone would remove the
disk from the system and look at each individual sector, they would
not find "foobar" anywhere.

Ideally this erasure would be done in real-time, when a DELETE/DROP is
actually performed, although my client would accept a solution where
some utility is executed daily (the database engine needs to stay
online, though).

Does this capability already exist within MySql? If not, can it be
implemented - either by some external utility, or [...gulp...] by some
modification to the source?

Also, does something like this exist for other database engines, like
Oracle, or SS, perhaps?

Any ideas on this subject will be greatly appreciated.

TIA

ken bass

Jul 23 '05 #1
4 1657
Ken Bass wrote:
Any ideas on this subject will be greatly appreciated.


I have an idea, but no clue whatsoever does it really work.

Call UPDATE query for that row multiple times, with random data as
values. If the data is written at the same part of the hard drive each
time, that would in theory destroy the data, if executed in a loop
enough times (20 should be enough).

But as I said, I have no idea would this really work, because it might
depend on the MySQL and on the filesystem where they write the data in
case of update happens. But if it works, that would be quite simple to
implement.
Jul 23 '05 #2
Aggro wrote:
Ken Bass wrote:
Any ideas on this subject will be greatly appreciated.

I have an idea, but no clue whatsoever does it really work.

Call UPDATE query for that row multiple times, with random data as
values. If the data is written at the same part of the hard drive each
time, that would in theory destroy the data, if executed in a loop
enough times (20 should be enough).

But as I said, I have no idea would this really work, because it might
depend on the MySQL and on the filesystem where they write the data in
case of update happens. But if it works, that would be quite simple to
implement.


You will also have to flush the buffers each time you write.

10 writes should be sufficient to prevent recovery by anyone
other than a government agency specializing in
encryption/decryption.

Of course the only absolutely safe method is to use only
non-removable media and to physically destroy the media when the
equipment is sold/trashed or whatever.

HTH

Jerry
Jul 23 '05 #3
Unfortunately, the issue here is more of a legal one:

If a table is used to maintain user information, then when a row is
deleted (presumably to remove all information about one user) there
should be no trace of that user's information left anywhere. Not at
the SQL level, not at the file level, and also not at the disk level.

At that point, if the equipment is subpoenaed by jack-booted
government thugs looking for information about that deleted user, they
can scan all of the disks, but they wouldn't find anythng.

I realize that at the SQL level there really is no control over
this. It is more up to the engine implementation, and how it uses the
filesystem. In some ways, it might be a nice feature to build into
MySql, although I am not sure how much effort that might be.

Thanks, though. All additional information is good to know.

ken

On Wed, 27 Apr 2005 17:30:10 GMT, jerry gitomer <jg******@veriz on.net>
wrote:
Aggro wrote:
Ken Bass wrote:
Any ideas on this subject will be greatly appreciated.

I have an idea, but no clue whatsoever does it really work.

Call UPDATE query for that row multiple times, with random data as
values. If the data is written at the same part of the hard drive each
time, that would in theory destroy the data, if executed in a loop
enough times (20 should be enough).

But as I said, I have no idea would this really work, because it might
depend on the MySQL and on the filesystem where they write the data in
case of update happens. But if it works, that would be quite simple to
implement.


You will also have to flush the buffers each time you write.

10 writes should be sufficient to prevent recovery by anyone
other than a government agency specializing in
encryption/decryption.

Of course the only absolutely safe method is to use only
non-removable media and to physically destroy the media when the
equipment is sold/trashed or whatever.

HTH

Jerry


Jul 23 '05 #4
Ken Bass wrote:
If a table is used to maintain user information, then when a row is
deleted (presumably to remove all information about one user) there
should be no trace of that user's information left anywhere. Not at
the SQL level, not at the file level, and also not at the disk level.


Simple--just stop making regular backups of your databases. That will
ensure that at some time in the future, all your data will be lost,
without possibility of recovery. But I suppose you want to be able to
have this happen on a schedule that _you_ control. ;-)

But seriously...

For what it's work, you should not rely on the multiple-UPDATE method to
overwrite data if you use InnoDB tables. If I understand it correctly,
InnoDB is a multi-versioning engine, so each UPDATE creates a new
version of the record, leaving past records in the file so that any
outstanding transactions can still read them. So the sequence of bytes
will still exist in the database file for a somewhat indeterminant
amount of time.

What I would do to eliminate data complete is:

1) Use simple SQL DELETE statements to remove the records as per normal.

2) Replicate database db1 to db2 so that all remaining data is preserved.

3) Destructively delete the files for db1 using a specialized tool for
that purpose.
This is in lieu of DROP DATABASE; destroying the data files (for
MyISAM) accomplishes the same thing.
If you use InnoDB, this might take some more configuration, because
the default is to store all data for all InnoDB tables together in one file.

4) Make your applications switch over to using db2. Next time you do
this cycle, do it in the reverse order and have the applications switch
to db1 after you destroy db2.

Destructive delete tools are available for most popular operating
systems. The idea is that they do more than the standard operating
system file deletion; they overwrite the file's data destructively.

See for examples (but feel free to search the internet for other solutions):
http://www.thefreecountry.com/securi...redelete.shtml

However, the solution proposed above has a timing issue. It isn't
practical to do this every time you delete any record. So there exists
the possibility that sensitive data will be seized by the jack-booted
thugs before you do your periodic cleanup cycle.

Regards,
Bill K.
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3552
by: Fughal | last post by:
Hi, I have a big DB2 database and I need this database without any Data in it for testing something. I have made a backup of these db and restore it on a testing system. My Problem is now how can I delete all Data because there are more than 500 tables in the db, it’s impossible to delete all by hand. I thought theres is another way to do this: only copy the structure of the database into another DB, here is my problem how can I copy...
13
9537
by: Bob Darlington | last post by:
I have a repair and backup database routine which runs when a user closes down my application. It works fine in my development machine, but breaks on a client's at the following line: If Dir(strLDB) <> "" Then Kill (strLDB) where strLDB is the path to the ldb file. The client advises that the ldb doesn't lurk after the program closes. Any ideas?
1
1270
by: Rupert | last post by:
I am developing a system in ASP.NET and am new to the technology. I am running everything on the laptop I am developing on (windows xp). The DB is Oracle and my aspx pages and C# code behind classes and other classes are in one directory under IIS. The client plans to have an application server and two web servers (one for the intranet connections and one for internet connections). For security reasons the web servers will not be able...
6
4609
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application restarts and all active sessions are terminated. This error is also described in detail here:...
2
1714
by: SiouxieQ | last post by:
Hi there, I'm using the code below to try to delete a name from a list of names in a file. Unfortunately it doesn't quite do what I want it to. Instead of looking for the name in the textbox and deleting that it is just deleting the first line of data in the file.
1
3104
by: Pat | last post by:
Hi all, I have a really awkward situation that is causing memory leak problems. I'm passing data to a driver, and unfortunately, the driver code is not something I can change, and it is written in C, so it deals with the data as a big BYTE array. Basically, the driver expects a struct, followed immediately in memory by a big chunk of raw BYTE data. The size of the array of BYTEs is determined by certain members of the struct. So...
1
1591
by: Adrian Luck | last post by:
Hi I work for the British education department in a unit that is looking at ways to help physically disabled studnets to access their educational curriculum using computer systems and software. One of the biggest problems we have at this moment is that it is often very difficult for physically disabled students to logon to networked windows school systems, since they do not have the ability to manipulate a keyboard and mouse to enter their...
11
3677
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
1
1770
by: Kyosuke18 | last post by:
Hi everyone, I have a problem in deleting a data that is connected on the database.. I tried this code but it shows me an error: Run-time error '-2147217900(80040e14)': Syntax error in string in query expression 'ID=". Here is the code that i did: Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim ab As String cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\My...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.