{"id":10343,"date":"2023-05-11T20:01:43","date_gmt":"2023-05-12T01:01:43","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=10343"},"modified":"2023-09-05T11:46:32","modified_gmt":"2023-09-05T16:46:32","slug":"neo4j-basics","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=10343","title":{"rendered":"NEO4J: Basics"},"content":{"rendered":"<p>When I first encountered the idea of labeled property graph data storage, I thought about the Dirk Gently Holistic Detective Agency series &#8212; where a belief in the fundamental interconnectedness of things plays a central role to the plot. Traditional SQL storage stored information and relationships were defined by cross-referencing a field (or more) between tables. The creators of graph databases sought to store the relationships along with data elements.<\/p>\n<p>A labeled property graph database store <em>nodes<\/em> \u2013 the circles below \u2013 and define relationships \u2013 the lines \u2013 between nodes. Relationships are a way to show the interconnectedness of all things &#8212; people who purchased items, individuals who acted or directed films. I am looking at graph databases to maintain plant hybridization records &#8212; relationships build the family tree.<\/p>\n<p>Nodes can have a label \u2013 essentially a classification, here I have \u201cCandidate\u201d nodes and \u201cElection\u201d nodes. A node can have multiple labels &#8212; maybe a political party affiliation as well as candidate. Nodes can include relationships to themselves (I&#8217;ve met me?)<\/p>\n<p>Relationships have a type \u2013 WON or LOST here. Relationships are also directional \u2013 an election didn\u2019t win a dude, a dude won an election.<\/p>\n<p>Both nodes and relationships can have properties \u2013 additional information about the entity. In this example, each election node stores a year in which the election took place along with the vote totals both popular vote and electoral college results.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1424\" height=\"599\" class=\"wp-image-10344\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1.png 1424w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1-300x126.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1-1024x431.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1-768x323.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/09\/word-image-10343-1-750x315.png 750w\" sizes=\"auto, (max-width: 1424px) 100vw, 1424px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I first encountered the idea of labeled property graph data storage, I thought about the Dirk Gently Holistic Detective Agency series &#8212; where a belief in the fundamental interconnectedness of things plays a central role to the plot. Traditional SQL storage stored information and relationships were defined by cross-referencing a field (or more) between &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1896],"tags":[1897],"class_list":["post-10343","post","type-post","status-publish","format-standard","hentry","category-neo4j","tag-neo4j"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10343"}],"version-history":[{"count":5,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10343\/revisions"}],"predecessor-version":[{"id":10363,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10343\/revisions\/10363"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}