Forums

Please or Register to create posts and topics.

SQLite dump command and output

I have been using the SQLite command line tool "SQLite3" in recent weeks
to generate and experiment with database dump files.
A dump file, created by the dot command ".dump" contains all of the SQL
command text to regenerate the database it was created from.
It seems to be a commonly used tool among database pros, but it was fairly
new to me.
What I find interesting is the ability to use text comparison utilities to
compare different versions of a database once the versions have been dumped
to SQL.
It's a way to save my TestDat.rmtree in my git repo as a text file that allows
git to compare versions.
I anticipate that dump files may be appropriate for various search and replace
operations that are usually done on GEDCOM output.
It is also an easy way to create a "RMNOCASE-free" version of an RM database.
Just edit instances of the text RMNOCASE to NOCASE in the dump file and
regenerate the database. The new database works as expected in RM.
RM's Rebuild Indexes command didn't reintroduce RMNOCASE. This needs more
testing before I would consider it for my production database.
That's it.
Richard Otter
Tom Holden, thejerrybryan and kevync have reacted to this post.
Tom Holdenthejerrybryankevync

Cool tip -- might look into.

 

Quote from Richard Otter on 2025-08-18, 1:05 pm
...It's a way to save my TestDat.rmtree in my git repo as a text file that allows
git to compare versions.
That's clever.
I anticipate that dump files may be appropriate for various search and replace
operations that are usually done on GEDCOM output.
Good point. Might be easier for some things and certainly for global search and replace. And maybe more risky.
It is also an easy way to create a "RMNOCASE-free" version of an RM database.

I had done that in the early days of RM4 just playing around but never continued with a production database as I was frequently creating new ones and receiving them from others.