CREATE
(p1:Person {name:'胡兴炯', born:1991, interest:'mac,ios,旅游', goodat:'java,swift,objectiveC'}),
(p2:Person {name:'张勇', born:1990, interest:'android', goodat:'java,android'}),
(p3:Person {name:'成文龙', born:1990, interest:'linux,hadoop', goodat:'linux,java,android'}),
(p4:Person {name:'王昕', born:1978, interest:'wpf,noSQL,旅游', goodat:'java,c#'}),
(p5:Person {name:'周开琪', born:1977 , interest:'管理', goodat:'管理,'}),
(p6:Person {name:'徐锦亮', born:1985, interest:'前端', goodat:'前端,html5,hadoop'}),
(p7:Person {name:'张三', born:1993, interest:'大数据', goodat:'hadoop,html5,java,lucene,elasticsearch,solr'}),
(p8:Person {name:'徐辉霞', born:1990, interest:'管理,旅游', goodat:'管理,采购'}),
(p9:Person {name:'黄廷鹏', born:1992, interest:'OA', goodat:'java'}),
(p10:Person {name:'史乐乐', born:1991, interest:'OA,旅游', goodat:'管理'}),
(p1)-[:认识]->(p2),
(p1)-[:认识]->(p3),
(p1)-[:认识]->(p4),
(p1)-[:认识]->(p5),
(p1)-[:认识]->(p9),
(p2)-[:认识]->(p1),
(p2)-[:认识]->(p3),
(p2)-[:认识]->(p4),
(p2)-[:认识]->(p5),
(p2)-[:认识]->(p9),
(p3)-[:认识]->(p1),
(p3)-[:认识]->(p2),
(p3)-[:认识]->(p4),
(p3)-[:认识]->(p5),
(p3)-[:认识]->(p7),
(p4)-[:认识]->(p1),
(p4)-[:认识]->(p2),
(p4)-[:认识]->(p3),
(p4)-[:认识]->(p5),
(p4)-[:认识]->(p9),
(p5)-[:认识]->(p1),
(p5)-[:认识]->(p2),
(p5)-[:认识]->(p3),
(p5)-[:认识]->(p4),
(p5)-[:认识]->(p6),
(p5)-[:认识]->(p8),
(p5)-[:管理]->(p1),
(p5)-[:管理]->(p2),
(p5)-[:管理]->(p3),
(p5)-[:管理]->(p4),
(p5)-[:管理]->(p6),
(p6)-[:认识]->(p5),
(p6)-[:认识]->(p4),
(p6)-[:夫妻]->(p8),
(p9)-[:认识]->(p1),
(p9)-[:认识]->(p2),
(p9)-[:认识]->(p3),
(p9)-[:认识]->(p10),
(p9)-[:喜欢]->(p10),
(p10)-[:认识]->(p9),
(p10)-[:同事]->(p7)
如下图所示,那么就创建成功了。
如何图形化显示呢?
按照下图依次点击1,2,3,进行图形化显示。
上述是添加数据进入到图数据库,如何删除回到最初始的界面呢?
MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n,r
match (n : attribute) delete n
CREATE
(p1:user {name:'Alice'}),
(p2:attribute {name:'A学校'}),
(p3:attribute {name:'B学校'}),
(p4:attribute {name:'New York'}),
(p5:attribute {name:'Google'}),
(p6:attribute {name:'Office'}),
(p7:attribute {name:'Finance'}),
(p1)-[:高中学校]->(p2),
(p1)-[:大学学校]->(p3),
(p1)-[:工作城市]->(p4),
(p1)-[:工作公司]->(p5),
(p1)-[:技能]->(p6),
(p1)-[:技能]->(p7)
MATCH (a:Artist {name: “筷子兄弟”}) DETACH DELETE a