Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-03 Thread Webdude
Hi again peeps, thanks for all your help. Seems there are many variables that could restrict doing this reliably. As several of you have mentioned, I should really rethink my design before this simple idea becomes far more complex than it needs to be. Cheers, David.

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-03 Thread Webdude
Hi Jay, thanks for your help, / > Does anyone know if SQLite stores additional unique internal />/ > information such as timestamps etc. that would affect this, and />/ > if so could these "additional to the data" variable features be />/ > disabled in any way? // />/ SQLite files

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-03 Thread Webdude
Hi Jean-Christophe thanks for your help. > Instead of trying to compare the hashes of DB files themselves, you > appear to want a strict comparison of sets in the contents of the DBs. No, I physically need the end resulting file to hash to the same value. The file becomes a new identity in

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Webdude
/ Inserting the same data in the same order on the same platform />>>/ with the same (PRAGMA) settings would result in the files />>>/ matching identically. // />>/ Do you feel that the platform - Hardware / OS / some other factor could influence the way SQLite performed its sequence? /

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Webdude
/ It's not important that the 2 db files are exactly the same all the time />/ that people are editing them, but only when they 'finalise' a 'package'. />/ So what if some code in the 'packaging' process performed a sequence of />/ queries that read all the data from the db, table by table,

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Webdude
Hi Simon, thanks for helping me with this. Inserting the same data in the same order on the same platform with the same (PRAGMA) settings would result in the files matching identically. Do you feel that the platform - Hardware / OS / some other factor could influence the way SQLite

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Webdude
Hi Nico, thanks for the reply. You can't rely on two SQLite3 DBs with the same contents being equal files. The sequences of INSERT/UPDATE/DELETE statements that created the two files with the same contents can differ and thus result in different b-tree layouts. It's not important that

[sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Webdude
Hi, I am building a file comparison tool that is free as in beer and speech. The program allows people to put certain things in an SQLite database file, then an MD5 or SHA hash is run on the resulting file for identity of the total package contents. A key part of the design requires that if