Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 8

Warning: include_once(http://www.genealogypro.net/Header/headerjs.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 8

Warning: include_once() [function.include]: Failed opening 'http://www.genealogypro.net/Header/headerjs.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 8

Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Warning: include_once(http://www.genealogypro.net/Header/header.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Warning: include_once() [function.include]: Failed opening 'http://www.genealogypro.net/Header/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Warning: include_once(http://www.genealogypro.net/MacOSX/Documentation/Manual/manhomelink.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Warning: include_once() [function.include]: Failed opening 'http://www.genealogypro.net/MacOSX/Documentation/Manual/manhomelink.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 18

Appendix 3: Genealogy Pro Data Storage Format

This appendix is designed for users with a programming background.

This chapter assumes that you have a basic understanding of the Unix Shell and a moderate understanding of Structured Query Language (SQL).

This section makes use of the Sqlite3 executable that is packaged with MacOS X starting with MacOS X system 10.4. If you are running MacOS X with a system prior to system 10.4 it is available as a free download.


File Wrapper Structure

Genealogy Pro documents are File Wrappers - that is, they are directories that are flagged by MacOS X to be presented to the user as a file. The listing in the image below shows the contents of the directory.

All data is stored in the .Contents/Resources/ directory and comprises:




Database Tables

The image below shows the list of tables in the database when querying the database with the sqlite3 executable.




The persons and families Table

The tables that store family information are the 'persons' and the 'families' table.

The image below shows a listing of the persons table. The columns in the table are:

When fields are defined using the 'Database⇒Define New Field ...' function, and the Field Association option chosen is "Individual Field", the new field (except for combined fields) will appear as a column in the 'persons' table. Where the field type is :



The image below shows a listing of the families table. The columns in the table are:

As for 'persons', when fields are defined using the 'Database⇒Define New Field ...' function, and the Field Association option chosen is "Family Field", the new field (except for combined fields) will appear as a column in the 'families' table. Where the field type is :




The names, firstnames and surnames Table

The names table has the following columns:



The surnames table has the following columns:

Genalogy Pro keeps a running tab of how many times the row is referenced by other tables in the 'count' column. For example, if the user change the surname 'Jackson' to 'Smith', Genealogy Pro will decrement the count to zero. When the count reaches zero the row is flagged for deletion from the table.



The name of a person can be accessed by using the SQL join statement, such as the following:

select p.persons as "Genealogy Pro ID" , s.names as "Last Name" , f.names as "First Name" from persons p left outer join names n on p.name = n.names left outer join surnames s on n.surname = s.surnames left outer join firstnames f on n.firstName = f.firstnames order by s.names, f.names ;

The output from this statement is depicted below.




The dates Table

The dates table has the following columns:



The date field of a person can be accessed by using the SQL join statement, such as the following:

select p.persons as "id" , s.names as "last name" , f.names as "first name", d.day as "birth day", d.month as "birth month", d.year as "birth year" from persons p left outer join names n on p.name = n.names left outer join surnames s on n.surname = s.surnames left outer join firstnames f on n.firstName = f.firstnames left outer join dates d on p.birthdate = d.dates order by d.year asc, d.month asc, d.day asc;

The output from this statement is depicted below (now using a genealogy pro file, generated from importing the example GEDCOM file).




The table_descriptions Table

This table is used by Genealogy Pro to gather information about the tables. It stores information about the order of the fields (for displaying in the Individuals' browser or Family browser) and the display name of the fields (as displayed in the browsers).

 
Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 250

Warning: include_once(http://www.genealogypro.net/MacOSX/Documentation/Manual/man_footer.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 250

Warning: include_once() [function.include]: Failed opening 'http://www.genealogypro.net/MacOSX/Documentation/Manual/man_footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kylvqnox/public_html/Documentation/Manual/Data/storage.html on line 250