1.建立几个学校的节点
1.1创建一个节点的Cypher命令
create (Variable:Lable {Key1:Value,Key2,Value2}) return Variable
1.2创建一个学校的节点
create (n:School{name:'清华大学',code: '10003',establishmentDate:date ("1911-04-29")})return n

1.3一次创建几个学校的节点
create (n:School{name:'北京大学',code: '10001',establishmentDate:date ("1898-07-03")}),(:School{name:'复旦大学',code: '10246',establishmentDate:date ("1905-05-27")}),(:School{name:'上海交通大学',code: '10248',establishmentDate:date ("1896-04-08")})return n

1.4建立北京和上海两个节点
create(n:Location{name:'北京'}),(:Location{name:'上海'})return n

2创建学校和地区关系
2.1创建学校节点‘清华大学’和地区‘北京’的关系
match(a:School),(b:Location) where a.name='清华大学'and b.name='北京' create (a)-[r:Establish]->(b) return r

3.查询学校节点
3.1查询某个学校的节点
match(a:School) where a.name='上海交通大学' return a

3.2查询某个标签的所有节点
match(b:Location) return b

3.3通过函数type获取某个节点关系的类型
match(:School{name:'清华大学'})-[r]->() return type(r)

4.删除节点
4.1删除某个标签的节点
match(n:School) delete n

4.2删除所有节点
match(n) delete n

4.3删除两个节点之间的关系
match(:School{name:'清华大学'})-[r]->(:Location{name:'北京'}) delete r

4.4删除某个节点的关系
match(:School{name:'清华大学'})-[r]->() delete r

4.5删除某个标签的全部关系
match(:School)-[r]->() delete r

5.增加节点属性
match(a:School)where a.name='北京大学'set a.abbreviation='PekingUniversity'return a

6.删除节点属性
match(a:School)where a.name='北京大学'remove a.abbreviation
