赞
踩
https://pan.baidu.com/s/1hygHS6_W5rqoAc41V30sTQ 提取码:v5z4
切换到bin目录,输入neo4j.bat console命令之后
括号代表节点、大括号代表对象、中括号代表关系
match (n) detach delete n
小写student 可以理解为面向对象的实体
大写Student 可以理解为面向对象的类
create(student:Student{
id:1, name: "李雷"});
create(student:Student{
id:2, name: "韩梅梅"});
create(teacher:Teacher{
id:1, name: "仓老师"});
create(school:School{
id: 1, title: "山东蓝翔"});
match(s:Student{
id:1}),(t:Teacher{
id:1}) create (t)-[r:教授]->(s);
match(s:Student{
id:2}),(t:Teacher{
id:1}) create (t)-[r:教授]->(s);
match(s:School{
id:1}),(t:Teacher{
id:1}) create (t)-[r:就职于]->(s);
match(t:Teacher)
where t.id=1
set t.name="小泽老师"
match(s:Student{
id: 1})
detach delete s;
match (t:Teacher)-[r:教授]->(s:Student)
where t.id=1 and s.id=2
delete r
查看所有索引
:schema
创建索引
create index on:Student(name)
删除索引
drop index on:Student(name)
创建唯一索引
create constraint on (s:Teacher) assert s.name is unique
删除唯一索引
drop constraint on (s:Teacher) assert s.name is unique
MATCH (p:Person)-[r:投资]->(<
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。