Home of slaegt.net
 
Home | Thybo | Write Guestbook | Read Guestbook
 
Main
How-to
Why ?
From FTW to MySQL
 
slaegt.net
About
Future
 
Examples of sites
thybo.slaegt.net
gorm.slaegt.net
 
 

Copyright © 2002-2019 Torben Jørgensen. No reproduction of content allowed without permission from
Torben Jørgensen


How-to:

This genealogy site can present a number of different views on individuals and families.

A surname index is available from the left-hand menu, when browsing a family.

This family-icon  will generate a page showing parents, children and spouses of an individual.
The pedigree-icon  will generate a page showing an individual and three (or four or five) ancestral generations.
You can provide your own comments on individuals through this icon,
or view others comments (if any) through this icon .

You can also provide provide comments through the guest-book, available at the top menu.

Why ?:

The main purpose with this portal is to map and present the history of the Thybo family which was founded by Johanne and Bertel Peter Thybo around 1900, on the isle Mors in Denmark. During my work to accomplish this, I have met many interesting people, web-sites, projects, tool etc. which I think can be useful to other genealogists.

I have also devoted much of my time to finding better ways to share and compare information through the world-wide-web, as will be demonstrated on this website when you enter.

Last but not least, I am developing a software tool, to help archiving and presenting photographic material as part of any genealogy web-site.

About:

The major components are  MySQL ver. 5.1.38 database, PHP ver. 5.4.45 scripting interpreter and an Apache ver. 2.2.22 web-server - all hosted on a local server (1.86 GHz Intel(R) Atom (TM)) running Windows 7 and connected to the internet through a 250M/250M bit Fiber channel.

After installation of PHP 5.4, remember to do the following: Copy the file php.ini-recommended to the Windows folder, rename to php.ini and edit the content of the file as follows: Uncomment the line "extension=php_mysqli.dll", set extension_dir = "[your php folder]\ext". Then add "[your php folder]" to PATH, and reboot your computer.

This site is developed by "stealing" components off the web, mainly free-ware and open-source code, and then customizing for my purpose.

All genealogy pages are generated as dynamic HTML, i.e. on every request, an extract from the MySQL database is formatted to produce the actual page shown. This means that even though the site contains thousands of pages, it really does not take up more than a Megabyte of memory on my server.

Future:

The development on this site is never-ending, with respect to content as well as functionality. My plans for the near future is to add the following components, in the order shown

  • Photo gallery
  • Source documentation (view the original text of the source document)
  • Additional family sites (e.g. ingerslev.slaegt.net and bering.slaegt.net)

From Genealogy-program to MySQL:

I am using the tools and setup, described above to present my data. In order to support various different genealogy programs, I choose to use the standardized GEDCOM (see this article for details on GEDCOM) format as an intermediate file-format in the process of transferring data from the genealogy program to the portal. Depending on the genealogy program used, different approaches may have to be taken, but a first step is to export a GEDCOM file. From Family Tree Maker for Windows (FTW), I export a GEDCOM file, lets call it "MyFam.ged". This file holds all information about individuals, families, events, notes etc. in a standardized format. It actually is a text-file, so it can be viewed with a standard text-editor, e.g. notepad.

MyFam.ged may contain private data which you do not want to publish, or which is may not be published due to legislation. So one should sanitize MyFam.ged at this stage.
In Denmark, it is not allowed to publish the birth-date information of an individual, without first obtaining the right to do so from the individual. That is an impossible task, so I have taken the approach to have my portal automatically not display date and month of any currently living individuals (defined as persons whose birthday is complete, the birthday is less than 90 years ago, and no death date is known).
It might also have been possible to sanitize MyFam.ged with a tool like gedlivng. E.g.:

gedlivng -r -b -l "Private info" private.ged public.ged

Now MyFam.ged is ready for being imported to the MySQL database. The best tool (that I know) for this job is called ged2csv (available as shareware or freeware from www.infused-solutions.com - i use ver. 2.7.0.0). I open MyFam.ged in ged2csv and make a save to an MS access 2002 database (with the freeware version of ged2csv, this may take a little effort, with the shareware version it's a breeze), could call it "MyFam.mdb". Must remember to change the names of the tables in the "Options->MSAccess" tab - use these names: [gen_facts, gen_family, gen_indiv, gen_notes, gen_relation, gen_source, gen_citation]. Also, check the "Enable save to MS Access" checkbox, and select the "Access 2000/2002" option. Click "Save" to generate MyFam.mdb

I then need to transfer the Access database into the required MySQL database. For this purpose I use "MS Access to MySQL" (I use ver 2.0.0.64) available as freeware from Bullzip Note that this application requires the MySQL Connector/ODBC 3.51 available from MySQL to be installed.
You may have to delete an already existing database - if you are just updating an existing site.
Fire up the application, enter the information when asked by the wizard - note that it's possible to save it all such that it's easier the next time - (the MySQL server, the username and the password, the port, the name of the database to be used.
Click the "Run Now" button, and you are done.

 

If you want to manually create the MySQL tables, use the definitions below:

CREATE TABLE gen_citation (
factkey varchar(6) NOT NULL default '0',
srckey varchar(6) default NULL,
source text,
KEY factkey (factkey)
) TYPE=MyISAM;

CREATE TABLE gen_facts (
indfamkey varchar(5) NOT NULL default '',
type tinytext NOT NULL,
date tinytext NOT NULL,
place tinytext NOT NULL,
factkey varchar(6) NOT NULL default '',
KEY factype (indfamkey,type(3))
) TYPE=MyISAM;

CREATE TABLE gen_family (
famkey varchar(5) NOT NULL default '',
spouse1 varchar(5) NOT NULL default '',
spouse2 varchar(5) NOT NULL default '',
endstatus tinytext NOT NULL,
notekey varchar(6) NOT NULL default '',
PRIMARY KEY (famkey),
KEY spouse1 (spouse1),
KEY spouse2 (spouse2)
) TYPE=MyISAM;

CREATE TABLE gen_indiv (
indkey varchar(5) NOT NULL default '',
title tinytext NOT NULL,
surname tinytext NOT NULL,
givenname tinytext NOT NULL,
aka tinytext NOT NULL,
sex tinytext NOT NULL,
notekey varchar(6) NOT NULL default '',
PRIMARY KEY (indkey),
KEY sname (surname(5)),
KEY gname (givenname(5))
) TYPE=MyISAM;

CREATE TABLE gen_notes (
notekey varchar(6) NOT NULL default '',
text text NOT NULL,
PRIMARY KEY (notekey)
) TYPE=MyISAM;

CREATE TABLE gen_relation (
indkey varchar(5) NOT NULL default '',
famkey varchar(5) NOT NULL default '',
KEY indkey (indkey),
KEY famkey (famkey)
) TYPE=MyISAM;

CREATE TABLE gen_source (
srckey varchar(6) NOT NULL default '',
text text NOT NULL,
PRIMARY KEY (srckey)
) TYPE=MyISAM;