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 The Tree Relationship Calculator is an object that accepts an XML representation of a tree and will calculate the relationship of any two members within it. This article describes how relationships are calculated, and what terms like second cousin, or first cousin once removed, mean. This code includes an object for calculating relationships, written in JavaScript, as well as a web UI for rendering and interacting with the tree. The example project is setup as a classic ASP page.
http://www.codeproject.com/Articles/30315/Tree-Relationship-Calculator