I would like to be able to calculate the family relationship between two individuals in a family tree, given the following data schema (simplified from my actual data schema, on
This might help you, it's a lot of theory and implementation of SQL queries to generate and query tree structures
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
In particular, look at the adjacency list model which uses a family tree as example.