On 9/25/15, Aaron Digulla <digulla at hepe.com> wrote: > Hello, > > I was wondering if it was possible to create the same database (= no binary > difference) twice with sqlite. > > I tried by creating all tables in the same order and then inserting all rows > in order of the primary key. But if I create two database files with the > same code, the files are different (I checked with cmp(1) on Linux).
I suppose that depends on what commands you are doing to create your database. It works fine to create identical database files when I try it: drh at bella:~/sqlite/bld$ ./sqlite3 db1 <x7.txt drh at bella:~/sqlite/bld$ ./sqlite3 db2 <x7.txt drh at bella:~/sqlite/bld$ cmp db1 db2 drh at bella:~/sqlite/bld$ ls -l db1 db2 -rw-r--r-- 1 drh drh 2048 Sep 25 13:53 db1 -rw-r--r-- 1 drh drh 2048 Sep 25 13:53 db2 drh at bella:~/sqlite/bld$ sha1sum db1 db2 cb255bca921b05c8ccc11c573ac0259156fff472 db1 cb255bca921b05c8ccc11c573ac0259156fff472 db2 drh at bella:~/sqlite/bld$ > > Is there a way to create database files which only change when the data > inside changes? > > I'm using sqlite 3.8.10.1 > > -- > Aaron "Optimizer" Digulla a.k.a. Philmann Dark > "It's not the universe that's limited, it's our imagination. > Follow me and I'll show you something beyond the limits." > http://blog.pdark.de/ > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp drh at sqlite.org