Skip to content

Instantly share code, notes, and snippets.

@Jim-Salmons
Jim-Salmons / cg-meta-graph.adoc
Last active February 25, 2021 16:13 — forked from perival/cg-meta-graph.adoc
Sandbox for exploring the transition from Curt's first take on "self-descriptive" Neo4j databases.

A Simple Meta-Data Model for a Graph Database (Ver. 1.1)

Original by: Curt Gardner v1.0, 30-Sep-2013

Forked by: Jim Salmons v1.1, 06-Dec-2013 - Same basic document but leveraging Neo4j 2.x labels and tweaking queries accordingly. The most dramatic result of this is the elimination of the need for the explicit 'Admin' elements and all things related to the 'owns' relationship.

Note
Curt’s explanatory comments and diagrams from the 1.0 version of this GG do NOT sync with the refactoring I’ve implemented here. You can mentally replace Curt’s explicit 'ownership-related sets of nodes' idiom with subsets based on 2.0’s new label feature. That’s what you’ll see in the tweaked queries. The most visible result of using this important new feature in Neo4j is that the queries from Curt’s original GG produce results that are ONLY about the structure of the data to be contained in the "regular" database. There are no more 'Admin' nodes nor 'owns' relationships that are really elements specific to the embedded metam