Last active
July 20, 2016 15:29
-
-
Save suellenstringer-hye/e7fe169ecc92f13563f949d25dea9358 to your computer and use it in GitHub Desktop.
Completed graph of Ancient gods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Ancient Gods Geneaology | |
:neo4j-version: 2.1.0 | |
:author: Suellen Stringer-Hye | |
:twitter: @suellenshye | |
:tags: domain:education, use-case:geneaology | |
== Completed Graph | |
//graph | |
=== OUR DATASET | |
[source, cypher] | |
---- | |
CREATE | |
//People | |
(chaos:Person{name:'Chaos', role:'ruled over confusion about chaos', gender:'male'}), | |
(nyx:Person{name:'Nyx', role:'goddess of night', gender:'female' }), | |
(erebus:Person{name:'Erebus', role:'associated with the underworld', gender:'male'}), | |
(aether:Person{name:'Aether', role:'god of the shining light of the blue sky', gender:'male'}), | |
(hemera:Person{name:'Hemera', role: 'goddess of the daytime', gender:'female'}), | |
(tartarus:Person{name:'Tartarus', role: 'associated with the abyss of the underworld', gender:'male'}), | |
(gaia:Person{name:'Gaia', role: 'mother earth', gender:'female'}), | |
(eros:Person{name:'Eros', role: 'god of procreation', gender:'male'}), | |
(pontus:Person{name:'Pontus', role: 'associated with the sea', gender:'male'}), | |
(uranus:Person{name:'Uranus', role: 'god of the heavans', gender:'male'}), | |
//Relationships | |
(chaos)-[:WAS_MARRIED_TO]->(nyx), | |
(chaos)-[:WAS_FATHER_OF]->(erebus), | |
(nyx)-[:WAS_MOTHER_OF]->(erebus), | |
(erebus)-[:WAS_CHILD_OF]->(nyx), | |
(erebus)-[:WAS_MARRIED_TO]->(nyx), | |
(aether)-[:WAS_CHILD_OF]->(nyx), | |
(aether)-[:WAS_CHILD_OF]->(erebus), | |
(hemera)-[:WAS_CHILD_OF]->(nyx), | |
(hemera)-[:WAS_CHILD_OF]->(erebus), | |
(hemera)-[:WAS_MARRIED_TO]->(aether), | |
(hemera)-[:WAS_MARRIED_TO]->(aether), | |
(tartarus)-[:WAS_CHILD_OF]->(hemera), | |
(eros)-[:WAS_CHILD_OF]->(hemera), | |
(pontus)-[:WAS_CHILD_OF]->(hemera), | |
(gaia)-[:WAS_CHILD_OF]->(hemera), | |
(tartarus)-[:WAS_CHILD_OF]->(aether), | |
(eros)-[:WAS_CHILD_OF]->(aether), | |
(pontus)-[:WAS_CHILD_OF]->(aether), | |
(gaia)-[:WAS_CHILD_OF]->(aether), | |
(uranus)-[:WAS_CHILD_OF]->(gaia), | |
(gaia)-[:WAS_MARRIED_TO]->(uranus) | |
---- | |
=== Which gods are male? | |
[source,cypher] | |
---- | |
MATCH (a:Person {gender:'male'})-[r]->(b) | |
RETURN DISTINCT a.name AS Name | |
---- | |
//table | |
=== Which gods are female? | |
[source,cypher] | |
---- | |
MATCH (a:Person {gender:'female'})-[r]->(b) | |
RETURN DISTINCT a.name AS Name | |
---- | |
//table | |
=== Who is an offspring of Nyx? | |
[source,cypher] | |
---- | |
MATCH (nyx)<-[r:WAS_CHILD_OF]-(b) | |
RETURN nyx,b; | |
---- | |
//graph_result | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment