-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/31/2010 07:28 PM, Nikolaus Rath wrote:
> Possible use case: I want to send someone an SQLite database with my
> data, so that he can debug an application that's using the database
> (since it's having problems with the particular set of data that I'm
> using it with). However, I don't want him to be able to actually read
> the data.

What part of the database is causing the problems?  Obviously if it is the
data itself, then that pretty much requires the original data.  For
performance issues you need the data to be representative, and also any
relations need to be maintained.

The problem with "crypt" or a one way hash is that they will fundamentally
change the data resulting in different lengths (or all the same length for
hashes) and break relations.

Presumably you also have a non-trivial amount of data otherwise you could
easily make mock database.  In addition to increasing sizes, crypt and
hashes will also make the data a lot harder to compress.

The way other guys handle this is to have metadata only modes.  For example:

  http://man.linux-ntfs.org/ntfsclone.8.html#sect7

A schema dump will get you the metadata.  analyze will help characterize
data.  I suggest writing an aggregate function to help characterize data -
for example it could give percentiles for value lengths (strings) and
something similar for numbers.

You should then be able to produce something that is the metadata plus data
characterization (both relatively small in size) that after being given to
someone else can be used to repopulate a database with appropriate random data.

In any event this is quite hard to do.  If you can do it for your own
datasets then it is a good starting point for something more generic -
perhaps a new dump mode?

On the other hand if you just want various actual
encryption/obfuscation/hash functions then SQLite provides easy ways of
adding those yourself.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxU/8MACgkQmOOfHg372QRLFQCdERisfI9iAxPYACNHCqVE98OU
FbQAoMZ/8pjdKfCwnxYSWp35RfyuXHmE
=jove
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to