puzzle - Extending the parent-child relationship -


Looking at the following table designs below, how will the following best questions be asked

  • A group of common ancestors given to two public AIDs
  • A group of descendants given a public id

> * Bonus 1 cousin cousin, twice given a public id

table folk

  folklore (PK) maternal grandfather (FK folklore) Pata (folklore from FK ) Name gender  

anyone To apply for a family? I did some time ago, using XML and XPath:

  & lt; Person & gt; & Lt; Person id = "1" name = "minuyu insanimi" surname = "minuyu perekonanaiimi" picture = "0" gender = "m" & gt; & Lt; Event Name = "Birth" prefix = "" Location = "Tallinn" date = "14.01.1963" & gt; & Lt ;! [CDATA ["Ilusal januarihommikul"]] & gt; & Lt; / Event & gt; & Lt; Event name = "death" prefix = "" location = "" date = "" /> & Lt; Father id = "2" type = "p & amp; # 228; rice" /> & Lt; Mother ID = "3" type = "P & amp; # 228; rice" /> & Lt; Spouse ID = "4" /> & Lt; / Person & gt; ...  

string xpath = "child :: * / child :: person [child :: dad [id = \" "+ string +" \ "] and children :: Mom [@ID = \ "" + String (spouse) + "\"]] "; e.t.c.


Comments