anonymous wrote:

My question is if its possible to somehow shred deleted records making them impossible to recover?

Helen Borrie answers:

My question is what evidence do you have that it is possible to recover deleted records from a Firebird database. :-)

I'm not really trying to be a smartass...but usually we get the opposite question: is it really impossible to retrieve records that were deleted by mistake? (It is! well, nearly.... There are complex tools and procedures in very expert hands that may be able to identify and recover some recently-deleted data if the database has been taken off-line immediately the mistake occurred).

The main thing that makes retrieving deleted records between "difficult" and "impossible" is the fact that Firebird doesn't store table data in physical tables at all (c.f. Access, MySQL, MSSQLServer, DBISAM, etc., which do literally maintain physical files within internally controlled directory structures...find the files and you've found the tables, indexes, etc. These products often have "undelete" tools that can be used by chimpanzees.)

In Firebird and InterBase, once a delete is committed the deleted record version is marked for garbage collection. At that point those experts with their abstruse tools have a chance of getting inside the database file and sifting through the garbage in the hope of finding something. The worse the application code, the better the chances. If you have nice clean application code that doesn't leave obsolete record versions around, the normal course of events for deleted records is sudden death by decapitation...that is, they are replaced by a stub which will disappear next time you do a sweep. After that, the physical space where the record was before is just a campsite waiting for new tenants.

Of course, if you do a backup and restore, even the empty space is gone. Back versions and stubs are not backed up.

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Firebird Community

Published

Category

Gems from Firebird Support list

Tags