family-tree

Pedigree/Family tree chart from database

寵の児 提交于 2019-12-04 20:44:44
I am trying to generate pedigree (in other words family tree :) ) table from database... My schema: CREATE TABLE `horses` ( `horse_id` int(10) NOT NULL AUTO_INCREMENT, `horse_name` varchar(32) NOT NULL, `horse_sire` int(10) DEFAULT NULL, `horse_dam` int(10) DEFAULT NULL, PRIMARY KEY (`horse_id`), KEY `FKsire` (`horse_sire`), KEY `FKdam` (`horse_dam`), CONSTRAINT `FKdam` FOREIGN KEY (`horse_dam`) REFERENCES `horses` (`horse_id`), CONSTRAINT `FKsire` FOREIGN KEY (`horse_sire`) REFERENCES `horses` (`horse_id`) ) p.s. 'horse_dam' and 'horse_sire' represents parents... I have spent days on this

Looking for a Family Tree [closed]

淺唱寂寞╮ 提交于 2019-12-04 10:08:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am creating Family Tree feature for my web app with HTML5 requirements. I already searched and found some JS samples, but I haven't find any that fit with my requirements. I already tried JIT, Rafael, GoJS, etc. I found this to be the closest one is from GoJS: GoJS fam-tree option #1 But this not enough. I

Query the relation between two people in a Prolog Family Tree

天大地大妈咪最大 提交于 2019-12-04 08:18:16
Suppose I have the below code in my familyTree.pl file: male(tom). male(bob). female(lisa). female(emily). parent(tom, bob). parent(lisa, bob). morethanfriends(emily, bob). father(X,Y) :- male(X), parent(X,Y). mother(X,Y) :- female(X), parent(X,Y). girlfriend(X,Y) :- female(X), (morethanfriends(X,Y); morethanfriends(Y,X)). boyfriend(X,Y) :- male(X), (morethanfriends(X,Y); morethanfriends(Y,X)). Now, I want to get the answer to the questions like: What is the relationship between Tom and Bob ? What is the relationship between Lisa and Emily ? How can I ask the above questions to prolog? The

graph database for genealogy [closed]

陌路散爱 提交于 2019-12-03 21:06:05
could someone point me to a working use of a graph database for genealogy? I would like to learn neo4j and I use python so I was looking to make a genealogy graph db for myself to learn graph db's. I searched for examples to emulate and learn from (any graph db, any language) but was surprised how little I found. Note I mean graph db which has a different structure than a relational db. See http://en.m.wikipedia.org/wiki/Graph_database . I'm looking for an example schema for genealogy. If you want to learn to do graphdb, you don't need to use any software. Pencil, paper and brain will do. The

Rendering a dynamically created family graph with no overlapping using a depth first search?

扶醉桌前 提交于 2019-12-03 05:28:34
问题 I want to generate this: With this data structure (ids are random, btw not sequential): var tree = [ { "id": 1, "name": "Me", "dob": "1988", "children": [4], "partners" : [2,3], root:true, level: 0, "parents": [5,6] }, { "id": 2, "name": "Mistress 1", "dob": "1987", "children": [4], "partners" : [1], level: 0, "parents": [] }, { "id": 3, "name": "Wife 1", "dob": "1988", "children": [5], "partners" : [1], level: 0, "parents": [] }, { "id": 4, "name": "son 1", "dob": "", "children": [],

Looking for a Family Tree [closed]

↘锁芯ラ 提交于 2019-12-03 05:07:17
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I am creating Family Tree feature for my web app with HTML5 requirements. I already searched and found some JS samples, but I haven't find any that fit with my requirements. I already tried JIT, Rafael, GoJS, etc. I found this to be the closest one is from GoJS: GoJS fam-tree option #1 But this not enough. I need to connect one member with another member with drag and drop function. Is there some JS that may fit with the

Calculate Family Relationship from Genealogical Data

你说的曾经没有我的故事 提交于 2019-12-03 03:14:15
问题 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, only showing columns that directly apply to this problem): individual ---------- id gender child ---------- child_id father_id mother_id With this structure, how can one calculate the relationship between two individual id's (i.e. cousin, great grand uncle, etc.). Also, as there are actually two relationships (i.e. A-B

Rendering a dynamically created family graph with no overlapping using a depth first search?

随声附和 提交于 2019-12-02 17:51:23
I want to generate this: With this data structure (ids are random, btw not sequential): var tree = [ { "id": 1, "name": "Me", "dob": "1988", "children": [4], "partners" : [2,3], root:true, level: 0, "parents": [5,6] }, { "id": 2, "name": "Mistress 1", "dob": "1987", "children": [4], "partners" : [1], level: 0, "parents": [] }, { "id": 3, "name": "Wife 1", "dob": "1988", "children": [5], "partners" : [1], level: 0, "parents": [] }, { "id": 4, "name": "son 1", "dob": "", "children": [], "partners" : [], level: -1, "parents": [1,2] }, { "id": 5, "name": "daughter 1", "dob": "", "children": [7],

Simple recursive tree in PHP / MySQL

﹥>﹥吖頭↗ 提交于 2019-12-01 06:28:14
问题 I have this table in MySQL: id name mother 1 grandma 0 2 myuncle 1 3 mymom 1 4 me 3 5 mysister 3 6 myson 4 7 new_grandma_son 1 I almacenate this info in an array called data[] $data=array( array("id"=>1,"name"=>"grandma", "mother"=>0), array("id"=>2,"name"=>"myuncle", "mother"=>1), array("id"=>3,"name"=>"mymom", "mother"=>1), array("id"=>4,"name"=>"me", "mother"=>3), array("id"=>5,"name"=>"mysister", "mother"=>3), array("id"=>6,"name"=>"myson", "mother"=>4), array("id"=>7,"name"=>"new_grandma

Multiple partners in a family tree in d3.js?

安稳与你 提交于 2019-11-30 11:15:09
I have a family tree from Cyril's amazing answer but I'm trying to figure out how to adjust it to support multiple partners. In this case, I added a "Mistress" node and am trying to denote that "Mistress" and "John" had a child named "Hidden Son". The current data structure works like this: In that, the root object stores everything. It has a children array which contains the up most "generation" with no parents. It also contains an object that contains the children of these sibling objects/nodes. In the example above, this is root.children[2] . I'm thinking I would have to refactor the data