SQLite Export Import

From Gramps
Revision as of 17:10, 26 March 2009 by AaronS (talk | contribs) (New page: An exporter is being developed in [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/plugins/export/ExportSql.py?view=markup trunk/src/plugins/export/ExportSql.py] You can export m...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An exporter is being developed in trunk/src/plugins/export/ExportSql.py You can export most of GRAMPS through an SQL Export using the Export Assistant. (Currently, the selection options are ignored, and it will output everything).

SQL stands for "Structured Query Language" and is pronounced "sequel" (it is a joke: as it came after QUEL, it is its sequel). After you export your GRAMPS data into a file such as Untitled_1.sql using the above Exporter, then you can use SQL queries like:

$ sqlite3 Untitled_1.sql
SQLite version 3.5.9
Enter ".help" for instructions

sqlite> .tables
dates       family      names       people      repository
events      media       notes       places      sources   

sqlite> .headers on
.headers on

sqlite> select * from people;

sqlite> select * from names where surname like "%Smith%";

sqlite> .exit

The current database in GRAMPS would require that you write some code to do this, and you'd need to know some details about the data.