Skip to content

Instantly share code, notes, and snippets.

@rvanbruggen
Forked from nawroth/tutorial-graphgist
Last active December 19, 2015 04:39
Show Gist options
  • Save rvanbruggen/5898823 to your computer and use it in GitHub Desktop.
Save rvanbruggen/5898823 to your computer and use it in GitHub Desktop.
BeerGraph GraphGist
= My simple BeerGraph Datamodel =
Let's see if I can create a graphgist for my beers
[source,cypher]
----
CREATE (brewery:brewery{name:'Brewery'}), (beerbrand:beerbrand{name:'BeerBrand'}), (alcperc:alcoholpercentage{name:'Percentage'}), (beertype:beertype{name:'BeerType'})
CREATE (alcpercbefore:alcoholpercentage{name:'PercentageBefore'}), (alcpercafter:alcoholpercentage{name:'PercentageAfter'})
CREATE brewery-[:BREWS]->beerbrand<-[:HAS_ALCHOLHOL_PERCENTAGE]-alcperc
CREATE alcpercbefore-[:PRECEDES]->alcperc-[:PRECEDES]->alcpercafter
CREATE beerbrand-[:IS_A]->beertype
----
* Hover over the nodes to see the +name+ node property in the Graph below.
//graph1
== Customize the query with the neo4j console
//console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment