Changes

Jump to: navigation, search

Gramps SQL Database

25 bytes added, 22:33, 29 December 2014
Gramps SQL database Overview
There are two versions of exporting a SQL database: an ExportDjango version and an ExportSql/ImportSql version. Currently, the ExportDjango is the latest SQL design. You can access the older functionality through the ''ExportSql'' and ''ImportSql'' programs of the [[Third-party Plugins]] and the newer ExportDjango in SVN in [http://svn.code.sf.net/p/gramps/code/trunk/gramps/webapp/ /trunk/gramps/webapp/], [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/data/templates/ src/data/templates/] and [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/data/javascript/ /src/data/javascript/].
== Older version sample Sample usage ===== Newer Version ===
After dropping You can run the above plugins into your ExportDjango plugin in gramps32 once you have the setup finished.gramps/plugins subdirectory, you can:
python src/gramps.py -O "My Family Tree" -e familytree.sqlAfter initial Django setup in the README in in branch, you can:
This will export the entire contents of your database (not including bookmarks, gramplets, nor any meta data, etc python src/gramps.) into a sqlite3 database named py -O "familytree.sql'My Family Tree" -e ignored. Likewise, you can read the data back in to a new database:django
python src/grampsThis will export the entire contents of your database (not including bookmarks, gramplets, nor any meta data, etc.) into your database. There does not yet exist an ImportDjango, but hopefully later today..py -i familytree.sql
NOTE: if you import this file into an existing family tree, you will get corrupted data for any items that overlap with internal numbering! This has the same effect as importing with GRAMPS XMLExporting a SQL database can take up to 2 seconds per record to output.
Exporting a SQL database can take up to 2 seconds per record to output. Prior to adding indexes and primary keys, importing a SQL database can take up to 1 second a record to read in. However, with the keys and indexes enable, it only takes about 0.01 seconds per record.=== Older version ===
== Newer Version ==After dropping the above plugins into your .gramps/plugins subdirectory, you can:
You can run the ExportDjango plugin in gramps32 once you have the setup finished python src/gramps.py -O "My Family Tree" -e familytree.sql
After initial Django setup in This will export the README in in branchentire contents of your database (not including bookmarks, gramplets, nor any meta data, etc.) into a sqlite3 database named "familytree.sql'. Likewise, you canread the data back in to a new database:
python src/gramps.py -O "My Family Tree" -e ignoredi familytree.djangosql
This will export the entire contents of your database (not including bookmarks, gramplets, nor any meta data, etc.) {{man warn|Warning|If you import this file into your database. There does not yet exist an ImportDjangoexisting family tree, but hopefully later today..you will get corrupted data for any items that overlap with internal numbering! This has the same effect as importing with GRAMPS XML.}}
Exporting a SQL database can take up to 2 seconds per record to output. Prior to adding indexes and primary keys, importing a SQL database can take up to 1 second a record to read in. However, with the keys and indexes enable, it only takes about 0.01 seconds per record.
== External Access ==

Navigation menu