[sqlite] How can i install SQLite
Please help me on SQLite install ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How can i install SQLite
Hi, sqlite needs not and cannot be installed. It is an emedded system which you link to your application. See http://www.sqlite.org/serverless.html Martin Am 01.08.2010 08:58, schrieb MKiran: > Please help me on SQLite install > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
2010/8/1 Nikolaus Rath : > My question is about the pros and cons of adding > a one-way hash function to SQLite (maybe calling it crypt() was > misleading for some). There are a lot of these. See http://sqlite.mobigroup.ru/dir?name=ext/md5 http://sqlite.mobigroup.ru/dir?name=ext/murmurhash -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
Simon Slavin writes: >> Please don't suggest other ways of achieving this. There are plenty and >> I am able to use them. My question is about the pros and cons of adding >> a one-way hash function to SQLite (maybe calling it crypt() was >> misleading for some). > > That's what got me. Not only is crypt() the convention for an > encrypting function, it's the convention for a particular encrypting > function. I see, sorry. I guess I fell into the GNU trap again (glibc crypt does MD5 and SHA-x as well). >> Also, I would appreciate if you would not start a discussion about the >> possibility of collisions or the fact that same strings in different >> tables or columns would map to the same hash and thus weaken the >> scrambling (in case you are tempted to). Everyone who uses a hash >> function can be expected to take those things into account (that's why >> my example contained different salt strings for different columns). > > hash(x) does not sort the same way that x sorts, so any operation that > depends on the order of the returned rows will not work the same way. > Similarly, anything involving '>' or '<' won't give the same answers. > You will not be able to do maths on numbers or string operations on > strings. > > Even if your data is made up of discrete strings, and you only ever > care whether two strings are identical, then you need to worry how > lossy your hashing function is. There's a chance that it will turn two > different strings in your source database into the same string in your > hashed database. This will, of course, mean that not even '=' would > work the same way. Hmm, yes, these are good points. In my case they don't apply, but it means that my idea is certainly not as generally applicable as I first thought. That said, I still think it would be nice to have a build-in hash function in SQLite. Are Mark and I really the only two people who think that would be useful? Or is there some legal problem to e.g. incorporate the MD5 patch from mobigroup? (thanks for the link Alexey!). Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
"Jay A. Kreibich" writes: > On Sat, Jul 31, 2010 at 01:12:36PM -0400, Nikolaus Rath scratched on the wall: >> >> When tracing down bugs in an application that uses SQLite, I have >> repeatedly faced the problem that I wanted to send (or get) a copy of >> the sqlite database without disclosing potentially sensitive contents. >> >> I think it would be fantastic if SQLite had a build-in crypt() function, >> so that I could simply copy the database and then do >> >> UPDATE my_secret_contacts SET name=crypt(name, 'bz'), phone=crypt(phone, >> 'za'); >> >> i.e., scramble all the information but keep the structure intact. > > I would forget the hash all together. Just assign random data. > > If you know the columns do NOT have duplicate values, or you don't > care about matching rows, this is trivial: > > UPDATE my_secret_contacts SET name = hex( randomblob( 16 ) ), > phone = hex( randomblob( 16 ) ); Oh, that's interesting. I considered that at the beginning, but I never tried it because I assumed that randomblob() would be evaluated only once and it would set all rows to the same value. Does that mean that if I execute UPDATE bla SET number = 1+1; SQLite will calculate 1+1 again and again for every row in the table? Anyway, especially with keeping the mapping table this seems like a much better solution than the hash function. Thanks! >> Therefore I was wondering what the opinions are about including a >> crypt() function in SQLite itself. Is that a sensible idea or nonsense? > > If this was to go into the core, you would want cross-platform, > cross-OS compatibility, which means putting the actual hash function > itself into SQLite, and not depending on a system library call. > So you'd be shipping crypto code. Because the SQLite project is located > in the United States, that's going to get very messy, from a legal > standpoint, especially with SQLite's not-a-license distribution. That's a good enough reason indeed. Thanks for clarifying. Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
Roger Binns writes: > 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. In the case that I had just now, there is a database with file system metadata (file and directory names, attributes, tree structure). Something is wrong with the metadata, so I want to run the equivalent of an fsck on the database. However, the user that has the problem would rather not send me a database complete list of the fields that he has stored. Since in this case the file names are just opaque labels without any relations or structure, hashing them all was a pretty good solution. Since I had to write an extra program for this simple operation, I was wondering why there isn't a hash function build into SQLite. > On the other hand if you just want various actual > encryption/obfuscation/hash functions then SQLite provides easy ways of > adding those yourself. You mean with sqlite_create_function()? Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Error in the documentation
Hello ^^ On the end of this site: http://www.sqlite.org/cvstrac/wiki?p=ManagementTools Is an error with the entities. http://www.areanda.com >видео раÑкрутка Ñайта http://www.areanda.com >видео раÑкрутка Ñайта This is written at the end. With best wishes Artur Artur Reilin sqlite.yuedream.de ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] How to manipulate Tcl lists/dicts by SQLite user-defined functions?
I'm store Tcl lists/dicts in SQLite but there is no functions to manipulate by these. I want to find or write the extension. May be this exists? Or how to do it optimally? Of cource example will be very helpful. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2010 08:47 AM, Nikolaus Rath wrote: > Since in this > case the file names are just opaque labels without any relations or > structure, hashing them all was a pretty good solution. I think it is rare that would work as a way of obfuscating SQLite databases in general since it would break relations and alter the statistical distribution of values. Also note that a hash function would not be sufficient since it can be used to confirm things. For example you could use the hashes to confirm if "Nigerian Prince.txt" is one of the filenames. > I was wondering why there isn't a hash function build into SQLite. Firstly note the last 4 letters of the name. It is indeed a fairly frequent lament here that SQLite should include some functions the poster thinks is generally applicable. Did you know it doesn't include a string reverse function as standard, nor any of the trigonometry ones, not even square root, is missing many potentially useful string functions and even omits statistical functions like standard deviation, median etc? There is no way the SQLite team could make everyone happy and what one group of people find useful would be totally useless to many others. Consequently they created APIs that make it easy to add functions. > You mean with sqlite3_create_function()? That is the one. You can even override the builtin functions using it. If you are doing this with APSW and want some help making it work automagically for all your code as well as the shell then post to the python-sqlite mailing list. Also see the bottom of http://sqlite.org/contrib Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxWFVYACgkQmOOfHg372QSb/ACgnCv9VSmtzGgOJXOMWXTZhkXZ TCkAoLAp0nwRiUf0grBffr+6i3R6hxjU =gKta -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error in the documentation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2010 10:14 AM, Artur Reilin wrote: > On the end of this site: > http://www.sqlite.org/cvstrac/wiki?p=ManagementTools > > Is an error with the entities. It is a just a Russian spammer and I've removed the text. The wiki pages are not part of the main documentation and are editable by anyone. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxWFfsACgkQmOOfHg372QSgQwCeIQFzgFzDFm+ARQ39vkBAlvgX L54AmwTDHbsXPeb0e0AHY8WvbTOmTgyJ =E09b -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
Roger Binns writes: >> I was wondering why there isn't a hash function build into SQLite. > > Firstly note the last 4 letters of the name. It is indeed a fairly frequent > lament here that SQLite should include some functions the poster thinks is > generally applicable. Did you know it doesn't include a string reverse > function as standard, nor any of the trigonometry ones, not even square > root, is missing many potentially useful string functions and even omits > statistical functions like standard deviation, median etc? No, actually I did not really notice until now. But now that you say it, trigonometry and statistical functions really ought to be included as well! I don't see the point for a string reverse though, what would you need that for? SCNR, I get the point. But I do think that SQLite could get a few more functions without immediately becoming SQHeavy. -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] VACUUM and WAL
Hi, Could someone clarify to me how the VACUUM command works if WAL is enabled? I would like to compact my database, but I am note sure if I should: 1) Run PRAGMA wal_checkpoint to get all outstanding commits into the database file and then VACUUM to compact the database file, or should I 2) Run VACUUM to create a compact version of the database file (but writing into the WAL file) and then run PRAGMA wal_checkpoint to get the changes done by VACUUM into the database file itself? The documentation says that "The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy". But it seems to me that this might be a remnant from the days of the old journal, since now the WAL file could be used instead of the temporary database. Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
On 2 Aug 2010, at 2:48am, Nikolaus Rath wrote: > Roger Binns writes: >>> I was wondering why there isn't a hash function build into SQLite. >> >> Firstly note the last 4 letters of the name. It is indeed a fairly frequent >> lament here that SQLite should include some functions the poster thinks is >> generally applicable. Did you know it doesn't include a string reverse >> function as standard, nor any of the trigonometry ones, not even square >> root, is missing many potentially useful string functions and even omits >> statistical functions like standard deviation, median etc? > > No, actually I did not really notice until now. But now that you say it, > trigonometry and statistical functions really ought to be included as > well! SQLite is a database engine. Neither trig functions nor stats functions improve the handling of data. If you want trig and stats, dig up one of the many trig and stats libraries. If you want SQLite to do them internally, write some SQLite extensions. That way you can have them when you want them, but I don't have to have them when I don't. > I don't see the point for a string reverse though, what would you > need that for? Searching for words by their ending. So you can quickly find all words that end in 'ly', for instance, without having to store every word twice. Ironically a feature I might actually use. Almost all uses of SQLite are as a trivial part of another application on a desktop computer (e.g. Mozilla) or embedded in hardware (e.g. a mobile phone). Any big programming environment on a desktop computer has trig and stats functions implemented already, so they don't need them in a database engine. Any small programming environment is small because users want it small, and making SQLite big means they have to use a more Flash memory, which means increased cost, weight and bulk of the finished product. There are legitimate arguments for building certain facilities into SQLite because they increase the power of the database engine for doing its job -- handling data. For instance, including certain ICU (International Components for Unicode) functions would mean that SQLite could handle many other languages as well as it can handle English. That would be a big win for all manufacturers trying to market their products in more than two countries. But frankly I'm not even sure that abs(), round() and soundex() should be in SQLite. I wonder how they ever made it in. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
On Sun, Aug 01, 2010 at 09:48:11PM -0400, Nikolaus Rath scratched on the wall: > SCNR, I get the point. But I do think that SQLite could get a few more > functions without immediately becoming SQHeavy. Perhaps, but considering how easy it is to add your own functions, the motivation for putting stuff into the core is very low. There are several third-part extensions that import a whole slew of functions. I also wasn't kidding when I said that exposing a system crypt() function to the SQL layer is a 15 minute task for someone that has written a few of them before. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] crypt() as SQL core function
2010/8/2 Simon Slavin : > But frankly I'm not even sure that abs(), round() and soundex() should be in >SQLite. I wonder how they ever made it in. Soundex function is build-in :-) Compile with -DSQLITE_SOUNDEX. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users