Welcome, Guest. Please login or register for free.
Did you miss your activation email?
Tuesday 02 December 08 16:54 GMT (UK)
Welcome Home Help Shop Search Calendar Login Register
Search Images 

Online
 
  First Name(s)

Last Name

 
News: Not only is RootsChat totally free, but you can have FREE WEBSPACE  too for your family history or local history webpages.

+  RootsChat.Com
|-+  General
| |-+  The Common Room
| | |-+  Technical Help (Moderator: Ticker)
| | | |-+  MySQL database help required
« previous next »
Pages: [1] Print
Author Topic: MySQL database help required  (Read 195 times)
Zeb
RootsChat Senior
****
Offline Offline

Posts: 431



WWW
MySQL database help required
« on: Wednesday 13 June 07 00:49 BST (UK) »

Does anyone here have their family tree stored on their own website within a MySQL database they've set up?

I'd like to get one set up on my web space but I can't for the life of me think of how the database would be structured - what tables where and what fields to have in them. That sort of thing.

The problem is I've got a lot of relatives around the UK and I'd love for them to be able to see my progress without me having to mail them now and then. A year or two ago I started working on a website which had no user interaction on at all. I had originally planned to burn this onto CD and pass copies onto family members when I'd finished but it wasn't long before I realised that you don't really ever finish adding to it.

If anyone would be able to post a dump of their table structures I'd be most grateful.
Logged

Derby: WOODCOCK (Donnington)
Devon: HARRIS (Plymouth)
Lancashire: DERRICK
Lincolnshire: CROPPER, WOODCOCK (Boston)
London: BARKER, DUGGIN, HARRIS, HINTON, HULBERT, WHITE
Wales: HARRIS, PRITCHARD (Pembrokeshire)
Warwickshire: DERRICK, WOODCOCK
Desperate for my Woodcocks from Birmingham!
downside
RootsChat Aristocrat
******
Offline Offline

Posts: 2626


Make my day


WWW
Re: MySQL database help required
« Reply #1 on: Wednesday 13 June 07 12:22 BST (UK) »

I don't use MySQL but when I designed my website I used the basic layout of the GEDCOM structure.  Effectively it is a two table structue:-

Individuals  e.g. I001
Groups (or Families) e.g. F01
Notes are handled as separate individual pages e.g. N001.

I use JavaScript which has a cllient side dependancy but it works fairly well on smallish databases (below 1500).
Logged

Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Zeb
RootsChat Senior
****
Offline Offline

Posts: 431



WWW
Re: MySQL database help required
« Reply #2 on: Wednesday 13 June 07 13:36 BST (UK) »

Thanks downside for your reply, I've had a look at your code on your website and Javascript is pretty much out of the question as I just can't get along with it.

When I was programming in assembler years ago I tried to learn C++ and couldn't get my head around it. Now I'd say assembler is the PHP and Javascript is C++ Cheesy

The only method I can think of so far is to have one main table called something like "people" containing all the information on each individual like dob, first names, surnames, married name etc. but the problem for me is separating generations & familes with the same surname and also to represent the relationships of one person to another.

Another way I thought of was to create tables with the name or each surname but again, it's how to separate generations & familes sharing surnames and to link relationships of individuals.

I think I'm going to have to create HTML pages for everyone and link them manually... Sad
Logged

Derby: WOODCOCK (Donnington)
Devon: HARRIS (Plymouth)
Lancashire: DERRICK
Lincolnshire: CROPPER, WOODCOCK (Boston)
London: BARKER, DUGGIN, HARRIS, HINTON, HULBERT, WHITE
Wales: HARRIS, PRITCHARD (Pembrokeshire)
Warwickshire: DERRICK, WOODCOCK
Desperate for my Woodcocks from Birmingham!
Berlin-Bob
Global Moderator
RootsChat Marquessate
*******
Offline Offline

Posts: 5227


by My Daughter. Chatting to find her Roots !


Re: MySQL database help required
« Reply #3 on: Wednesday 13 June 07 14:11 BST (UK) »

Hi Zeb,

just thinking out loud here:

I recently wrote a PHP program to construct descendant and pedigree charts from a GEDCOM file.
http://www.rootschat.com/forum/index.php/topic,143930.msg1134000.html#msg1134000

The idea was, that I only had one HTML page for descendant charts, and on HTML page for pedigree tables.

I did it by reading the GEDCOM file into several arrays, and then using these arrays. 

But if I create a database table for each array, and write the GEDCOM directly into that, then I could just as easily read the database to construct the tables .....  which is what I think you are looking for.

I'll think about it (quietly) a bit more, and let you know what comes out.

Bob
Logged

Searching for Coleman, Moore, Kallnung in London; Margulies, Remenyi in E. Europe;
Ancestors of Hessie Stevenson-Coleman-Baxter (Ireland, 1861)
and, of course, any other ancestors for my web-site.

All Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)
downside
RootsChat Aristocrat
******
Offline Offline

Posts: 2626


Make my day


WWW
Re: MySQL database help required
« Reply #4 on: Wednesday 13 June 07 15:52 BST (UK) »

I can't see any way of having less than 2 tables, Individuals and Groups.  When I started out a few years ago I tried some of the methods you are examining but they didn't work in the long basically because a family tree is not limited to X number of people.  No sooner have you designed a site for 300 individuals, when someone contacts you and you then start adding more and more.  It was only when I looked at the structure of a GEDCOM file I realised all I have to do was emulate their file structure and the whole thing worked far more efficiently and with a lot less code.

Individual datafields:
ID, firstName, middleName, surname, sex, birthDate, placeBornTown, placeBornCounty, deathDate, placeDiedTown, placeDiedCounty, DID, AID

DID = DescendencyID (can be blank)
AID = AscendencyID (can be blank)

Group datafields:
GID, husband, wife, progeny, marrDate, marrPlace

The problem is you need a way of displaying the quatity of marriages.  If an individual marries more than once and has children with each of those relationships then you need a way of displaying that information.  The only way of doing that is with a 2nd table called Groups or Familes.

Incidentally you should not have a field called Married Name because a woman's maidenname is always displayed, even if she marries 2 or 3 times.
Logged

Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Zeb
RootsChat Senior
****
Offline Offline

Posts: 431



WWW
Re: MySQL database help required
« Reply #5 on: Thursday 14 June 07 02:12 BST (UK) »

Thanks for the ideas. I've been reading up on the file format of GEDCOM files and it (so far) seems pretty straight forward.

I've downloaded a Word document explaining it so tomorrow morning I'll print it off and read through it properly. I'm thinking of writing a script to read a GEDCOM file and populating a MySQL database and using that or even as you say Bob, read the file into arrays and access it from there.

I remember reading a while back that some data can be lost when exporting to a GEDCOMfile - any idea what?
Logged

Derby: WOODCOCK (Donnington)
Devon: HARRIS (Plymouth)
Lancashire: DERRICK
Lincolnshire: CROPPER, WOODCOCK (Boston)
London: BARKER, DUGGIN, HARRIS, HINTON, HULBERT, WHITE
Wales: HARRIS, PRITCHARD (Pembrokeshire)
Warwickshire: DERRICK, WOODCOCK
Desperate for my Woodcocks from Birmingham!
downside
RootsChat Aristocrat
******
Offline Offline

Posts: 2626


Make my day


WWW
Re: MySQL database help required
« Reply #6 on: Thursday 14 June 07 12:08 BST (UK) »

Quote
I remember reading a while back that some data can be lost when exporting to a GEDCOMfile - any idea what?

A GEDCOM file does not lose data as such.  The problem lies with genealogy programs and what they export or do not export into a GEDCOM file.  Programs use additional fields which are not exported into a conventional GEDCOM or if they are, then they might be ignored by another program because the program does not recognise them.
Logged

Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Zeb
RootsChat Senior
****
Offline Offline

Posts: 431



WWW
Re: MySQL database help required
« Reply #7 on: Thursday 14 June 07 13:32 BST (UK) »

Thanks for clearing that up.

I've printed this document off and am going to hunt around for some free GEDCOM manipulation scripts in PHP Wink
Logged

Derby: WOODCOCK (Donnington)
Devon: HARRIS (Plymouth)
Lancashire: DERRICK
Lincolnshire: CROPPER, WOODCOCK (Boston)
London: BARKER, DUGGIN, HARRIS, HINTON, HULBERT, WHITE
Wales: HARRIS, PRITCHARD (Pembrokeshire)
Warwickshire: DERRICK, WOODCOCK
Desperate for my Woodcocks from Birmingham!
Pages: [1] Print 
« previous next »


[Copyright] [Free RootsChat Webspace] [Your Surname Interests] [Shrink Link] [About Us] [Terms of Use]
All Census Lookups are Crown Copyright, National Archives for academic and non-commercial research purposes only
RootsChat.com cannot be held responsible directly or indirectly for the messages or content posted by others. Inline images in messages are the copyright of the respective linked sites.
RootsChat.com, Europa House, Bury, Lancashire, BL9 5BT
0.363:21