DunsanakQL – Family Tree Query Language

altilunium1 pts0 comments

DunsanakQL - Family Tree Query Language

rtnF

SubscribeSign in

DunsanakQL - Family Tree Query Language<br>Aug 04, 2026

Share

So, today, a certain relative of mine gave me an invitation letter for the wedding of another certain relative of mine.<br>I’m quite impressed with that invitation letter, since it actually lists several of my close relatives whom I know well. The names of my close relatives are printed inside the invitation letter. And since this invitation is copied en masse for other guests, I guess we’re relatively well-known here.<br>Then I thought to myself... this list of names inside the invitation is quite a treasure in itself. It contains critical information that could help complete my family tree, a quest that I’ve been pursuing for years and still haven’t quite finished.<br>From this list, I could get the names of many of my relatives, both close and distant. But I think I should also encode additional information about the relationships between those relatives (whether they’re connected as parent and child or as spouses), and add it to the giant, unified family tree centered on myself.<br>Now, I wish we had something like SQL, but designed to store and query connections in a family tree.

In SQL, you can add data piece by piece, step by step, into one giant database, which may contain several tables, each of which may contain several columns. All of those tables and columns may be related to one another.<br>In this family-tree query language, maybe we could do the same.<br>We would add data piece by piece, one nuclear family at a time.<br>We define one nuclear family as the singular, atomic unit of the family tree. The entire family tree consists of many nuclear families.<br>One nuclear family consists of a biological father, a biological mother, and their ordered list of biological children.<br>We define it using this syntax:<br>[Dad - Mom] : [Child1, Child2, Child3]So, in this case, the first nuclear family that we want to add to the family-tree database would probably be the one that contains ourselves as a child.<br>Something like this (this is just an example):<br>[Dad - Mom] : [Me, Younger Sibling]When we enter this command into the system, the system assigns an ID to each person in that family. These IDs are then used to connect one nuclear family to another.<br>For example, in this case, Dad is #1, Mom is #2, I’m #3, and my younger sibling is #4.

Next, we expand the family tree by adding more nuclear families. This time, I want to add my mom’s family.<br>[MyGrandfather - MyGrandmother] : [MyAunt, #2, MyAunt, MyUncle, MyUncle]<br>Here, I use #2 as a pointer to my mom.<br>Then, execute the command.<br>The system assigns IDs to the newly added family members:<br>#5 : MyGrandfather<br>#6 : MyGrandmother<br>#7 : MyAunt<br>#8 : MyAunt<br>#9 : MyUncle<br>#10 : MyUncle

Then, keep going and enter more data.<br>[██████ - ████████] : [███ ███████, █████ ███████]<br>[██████████ - ███████] : [█████, #2, ████ ████████, █████ ██████, ██████ █████]<br>[███████ █████ - #7] : [█████ ████, █████ ██████, █████]<br>[████ ███████ - #8] : [███████ ███████, ██████ █████████]<br>[??? - ██████] : [█████, █████, █████, #1, █████, ███, ███, ██]<br>[#20 - ????] : [████, █████ █████, ███████, ██████, ████ ████████]<br>[#21 - ██████ ████] : [█████, █████, █████, █████ ███████]<br>[#22 - ????] : [█████, ███, █████, ???]<br>[#23 - █████] : [█████, ███, █████]<br>[#24 - ????] : [██████, ████, █████, █████]<br>[#25 - ????] : [█████, █████]<br>[#26 - ????] : [████████]<br>[#10 - ████████ ██████] : [████ ██████, ████ ██████, ████ ██████]

This is my own family tree, but all of the real names have been REDACTED . There are still a lot of people marked as “???”, since I can confirm that they exist, but I still haven’t learned their names. Maybe I should visit them more often.

After all the data has been entered into the system, we can query it to list all the relatives of a given person ID, sorted from closest to most distant, and grouped into several categories: Mom’s branch, Dad’s branch, spouse’s branch, and the rest (usually in-laws).<br>To query it, use this command:<br>c For example:<br>c 1This would gather and sort all of my relatives.

Here’s the source code, and here’s the live demo.<br>All data is stored locally in your own browser and is never sent to any server.<br>Oh, and a few additional features: right-click on someone’s name to rename them, and right-click on a family entry if you want to delete the entire family and all of its members.<br>And if you really want to reset everything, open Developer Tools → Application → Local Storage, find the familysql_db key, and delete it.

Share

Discussion about this post<br>CommentsRestacks

TopLatestDiscussions

No posts

Ready for more?

Subscribe

© 2026 rtnF · Privacy ∙ Terms ∙ Collection notice<br>Start your SubstackGet the app<br>Substack is the home for great culture

This site requires JavaScript to run correctly. Please turn on JavaScript or unblock scripts

family tree query nuclear relatives invitation

Related Articles