How can I connect to the DB?

Is it possible to connect to the local Gramps database and execute manual some sql-queries to get some specific data? Or maybe sometimes make group-updatings by substring via like.
I’m on Windows 10. Can install all needed software.

Could you pls describe how to make connection or maybe you already have an instruction. Thanks a lot!

You can connect to Gramps database with other tools, but most data is stored as pickled data blobs and is not accessible with SQL queries.

There is an addon (SQLite Export) which also exports pickled data into sqlite tables.

1 Like

There is a note in wiki for the early SQLite development: it says that parallel unpickled data is also stored for query performance reasons. (And probably as an experiment in moving away from pickled blobs.) That reads like: “you can use the parallel tables for queries but not writes.”

I wonder if that is accurate & where more information can be found.

Yes some data is duplicated e.g. for persons there are the first name and last name fields of the primary name and gender, but all other data is stored in the data blobs.

You can download and use sqlitebrowser to open your Gramps database (or a copy) and view the data/structure and compare it to the SQLite export addons database export.


Really @Mattkmmr . I’ve open the original DB. Almost all data are under BLOB. And then made sql-export and opened it - the DB has much more readable data. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.