Neo4J 图数据库学习-01
Posted yikuan-919
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Neo4J 图数据库学习-01相关的知识,希望对你有一定的参考价值。
1.CREATE (remeo:Person{name:"Remeo"}) - [:LOVES] -> (juliet:Person{name:"Juliet"}) CREATE (juliet) - [:LOVES] -> (remeo) return remeo,juliet;
2.CREATE (remeo:Teen:Person{firstName:"Remeo",lastName:"Montague",age:13}) - [:LOVES{since:"a long time ago",till:"forever",where:"Verona"}] -> (juliet:Teen:Person{name:"Juliet",lastName:"Capulet",age:13})CREATE (remeo) <- [:LOVES] - (juliet)
3.MATCH (n:Person) WHERE n.name="Juliet" or n.firstName="Juliet" return n
4.MATCH (n:Person) - [:LOVES] - () WHERE toLower(n.name) = "juliet" RETURN n ORDER BY n.age ASC SKIP 2 LIMIT 5
以上是关于Neo4J 图数据库学习-01的主要内容,如果未能解决你的问题,请参考以下文章