Difference between revisions of "Addon:SQLite Export Import"

From Gramps
Jump to: navigation, search
(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...)
 
m (out of date|can not find in gramps trunk)
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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 most of GRAMPS through an SQL Export using the Export Assistant. (Currently, the selection options are ignored, and it will output everything).
+
{{out of date|can not find in gramps trunk}}
 +
A Gramps exporter has been 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 all of the Gramps genealogical data through an SQL Export using the Export Assistant. This does not export other Gramps data, such as bookmarks, researcher information, etc.  
  
 
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:
 
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:
Line 27: Line 28:
 
</pre>
 
</pre>
  
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.
+
== See also ==
 +
[[GEPS 010: SQL Backend]]
 +
 
 +
[[Category:Developers/General]]

Revision as of 00:19, 26 January 2013

Gramps-notes.png This page's factual accuracy may be compromised due to out-of-date information. Please help improve the Gramps Wiki as a useful resource by updating it.

A Gramps exporter has been developed in trunk/src/plugins/export/ExportSql.py You can export all of the Gramps genealogical data through an SQL Export using the Export Assistant. This does not export other Gramps data, such as bookmarks, researcher information, etc.

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;
handle|gramps_id|gender|death_ref_index|birth_ref_index|change|marker0|marker1|private
b247d7186567ff472ef|I0000|1|-1|-1|1225135132|-1||0

sqlite> select * from names where surname like "%Smith%";
private|first_name|surname|suffix|title|name_type0|name_type1|prefix|patronymic|group_as|sort_as|display_as|call
0|Test|Smith|||2|||||0|0|

sqlite> .exit
$

See also

GEPS 010: SQL Backend