The Family Tree Software Series
Engineering with a Graph database #1
In 2012, I had a strong motivation for creating a family tree which helps me know more about my forefathers. So after searching around the web for some time, I have found a popular family tree software. Yay! With the help of my parents and grandparents, I was able to create a family tree. After adding few people, I had hit the ceiling for the number of people that can be added to the family tree in the free tire. The premium option was too costly and therefore had to leave the project in the middle.
Almost a decade has passed by and now my interest to build a family tree is rekindled. A YouTube video titled “Graph Databases Will Change Your Freaking Life” has changed my perspective towards graph databases. The speaker was enthusiastic and explained some basic concepts of graph databases and made it look easy. After watching more videos on graph databases, this project looked doable. Therefore in this article and the subsequent articles in the series, I will share my experience and learning points for developers who would like to use graph databases in their applications. I will be sharing my experiences of building a genealogy software that uses a graph database.
I have decided to build a family tree software than building a family tree because, in this way, I can perform some interesting graph-based analysis. I can know the average distance that the current generation kids have traveled, compared to the previous generation (a measure of globalization). I can also see the variation of jobs among the generations i.e, Are children taking up the same job as their parents? Such questions can be answered by using software with a graph database. The response time from SQL would be too high (due to many joins) to make an application with a good User Experience.
Many individuals are suffering from some form of dementia. There are some videos on the internet such as a mother unable to recognize her son. These videos are extremely disheartening to watch. After viewing some videos like this, I wanted to develop an AR glasses compatible software that would recognize people and let them help in the learning process.
Assisting the differently-abled not only makes their lives easier but also adds convenience to everyone else. Speech-to-Text software that is present in android helps the ones who are hard of hearing. It also helps others better understand a video that is in an unfamiliar accent or watch it in a quiet zone.
Similarly, this application makes it easier for me to interact more with relatives. For example, I have attended many family gatherings where I met some relatives but eventually forgot some aspects about them. During some other family gatherings, I wouldn’t be able to initiate a conversation confidently as I might have forgotten some crucial information. Such forgetfulness happens to many but can be reduced by having a list of people handy. One can refer to this when only partial information about the person is known.
With the increased hype for AR glasses which are right around the corner, there will be a demand for applications that rely heavily on live feed video. This application will be able to make use of this feature to create a comfortable life for all. Although the AR glasses is not a stable technology yet, this application can still work with pictures and videos.
SQL databases are like ledgers that one maintains. There are different tables where different kind of data is stored. For example, a table called employees may store all the data about employees in a company. There may be another table called departments which stores all the data about the departments in a company. In these ways, the data present in different tables are related by a “theme”. Based on the requirement of data, an appropriate table is selected for retrieving the data. This data may be related to other data in a different table through a foreign key mechanism. Such relations are generally present but are not mandatory.
In this design, the information is stored in a way that the data is given importance. Therefore it is best used to pick out a data item from the database
Graph databases store data in two major entities called Vertices and Edges. In this way of storage, every vertex is connected to many other vertices through edges. The richness of information is stored in these connections rather than the data itself. These databases are useful where SQL takes a long time or fails. An approximate SQL counterpart of edges would be the JOIN statements. With every join statement, execution complexity would drastically increase. If the application relies on these connections and the data, then graph databases are the way to go! These databases do not outperform SQL databases if they are just retrieving vertex information.
In this design, the information is stored in such a way, the connection between the data is as important as the data itself. Therefore moving through the data is required to get the right data.
SQL databases have software to visualize the entire database at once. There is SQL Workbench for MySQL and pgAdmin for Postgres SQL which show the stored data. Similarly, graph databases have UI interfaces too. Software such as Neo4j has them built into as an in-house UI functionality while databases like JanusGraph require other open-source software such as graphexp or Gephi. One may configure this software to understand the data present in the database as a visual representation. This configuration makes the learning process easier and more fun.
In this article, we have looked into graph databases. In the next article, I would be discussing about the software that I have used to build the family tree. I would also be sharing the reasoning that I have used for the same. If you liked this article, please follow so that my next article would appear in your feed. Please feel free to clap for the article if you have liked it.