Difference between revisions of "Addon:SQLite Export Import"

From Gramps
Jump to: navigation, search
(SQLite)
Line 6: Line 6:
 
SQL stands for "[https://en.wikipedia.org/wiki/SQL Structured Query Language]" and is pronounced "sequel" (it is a joke: as it came after QUEL, it is its sequel). SQLite is a common local database format
 
SQL stands for "[https://en.wikipedia.org/wiki/SQL Structured Query Language]" and is pronounced "sequel" (it is a joke: as it came after QUEL, it is its sequel). SQLite is a common local database format
  
 +
=Usage=
 
==Export SQL==
 
==Export SQL==
 
You can export most 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.  
 
You can export most 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.  
Line 13: Line 14:
  
  
==Using export with external programs==
+
=Using export with external programs=
 
After you use the SQL Exporter to export your Gramps data into a file such as <code>''Untitled_1.sql''</code>, you can then use SQL queries like:
 
After you use the SQL Exporter to export your Gramps data into a file such as <code>''Untitled_1.sql''</code>, you can then use SQL queries like:
  

Revision as of 22:19, 2 January 2016

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.

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 SQLite exporter and SQLite importer has been developed in master/Sqlite.

SQL stands for "Structured Query Language" and is pronounced "sequel" (it is a joke: as it came after QUEL, it is its sequel). SQLite is a common local database format

Usage

Export SQL

You can export most 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.

Import SQL

You can also import via SQL import.


Using export with external programs

After you use the SQL Exporter to export your Gramps data into a file such as Untitled_1.sql, you can then 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