Neo4J 图数据库学习-01

时间:2021-12-26 00:39:26

1.CREATE (remeo:Person{name:"Remeo"}) - [:LOVES] -> (juliet:Person{name:"Juliet"}) CREATE (juliet) - [:LOVES] -> (remeo) return remeo,juliet;

Neo4J 图数据库学习-01

 

 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)

Neo4J 图数据库学习-01

 

 3.MATCH (n:Person) WHERE n.name="Juliet" or n.firstName="Juliet" return n

Neo4J 图数据库学习-01

 

 4.MATCH (n:Person) - [:LOVES] - () WHERE toLower(n.name) = "juliet"  RETURN n ORDER BY n.age ASC SKIP 2 LIMIT 5

Neo4J 图数据库学习-01