Neo4j 配置

使用 Docker 运行 Neo4j

docker-neo4j

Neo4j Docker

运行

1
docker run -d --name=neo4j-3.5.6 --publish=7474:7474 --publish=7687:7687 --volume=$HOME/docker/neo4j/data:/data --env=NEO4J_AUTH=none neo4j:3.5.6

–env=NEO4J_AUTH=none 关闭密码认证

访问

http://127.0.0.1:7474/browser/

用户名:neo4j,密码:neo4j

Neo4j Browser

新建图

neo4j的搭建和实例使用

1
2
3
4
5
6
create(suxun:Person_{name:"苏洵",age:80,sex:"男"})
create(sushi:Person_{name:"苏轼",age:53,sex:"男"})
create(suzhe:Person_{name:"苏辙",age:51,sex:"男"})
create(suxiaomei:Person_{name:"苏小妹",age:45,sex:"女"})
create(susun:Person_{name:"苏孙",age:29,sex:"男"})
create(suxiaosun:Person_{name:"苏重孙",age:6,sex:"女"})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
match(p1:Person_),(p2:Person_)
where p1.name="苏洵" and p2.name = "苏轼"
create (p1) -[parent:Parent{relation:"父亲"}]-> (p2);

match(p1:Person_),(p2:Person_)
where p1.name="苏洵" and p2.name = "苏辙"
create (p1) -[parent:Parent{relation:"父亲"}] -> (p2);

match(p1:Person_),(p2:Person_)
where p1.name="苏洵" and p2.name = "苏小妹"
create (p1) -[parent:Parent{relation:"父亲"}] -> (p2);

match(p1:Person_),(p2:Person_)
where p1.name="苏轼" and p2.name = "苏孙"
create (p1) -[parent:Parent{relation:"父亲"}] -> (p2);

match(p1:Person_{name:"苏孙"}),(p2:Person_{name:"苏重孙"})
create (p1) -[parent:Parent{relation:"父亲"}] -> (p2);

查询渲染图

1
match(a)-[r:Parent]->(b) return a, r, b
1
:play https://guides.neo4j.com/sandbox/twitter-trolls/index.html

Graph Visualization Tools

Graph Visualization Tools

Graph Visualization With Neo4j Using Neovis.js

Neovis

Neo4j Sandbox

Russian Twitter Trolls

d3.js可视化neo4j图数据库项目

Popoto.js

Data Visualization

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. 使用 Docker 运行 Neo4j
  2. 2. Neo4j Browser
  3. 3. Graph Visualization Tools
,