当前位置:网站首页>Yyds dry goods inventory building knowledge map from scratch with neo4j (I)
Yyds dry goods inventory building knowledge map from scratch with neo4j (I)
2022-06-28 23:34:00 【wb59770b05237ae】
One 、 install Neo4j
Here are the official documents :https://neo4j.com/download/ Download through the above website , Remember what pops up key, This is required for subsequent software activation key.
Two 、 Basic usage
- New projects

2. Change project name

- Set up local database or remote database

- Start the local database

- adopt Neo4j Broswer To operate

Node operation
- Create nodes
create(: university {name:
" Xi'an University of Electronic Science and Technology "})
- 1.
- View the built node graph

- Adjust the size of the node display font

- Get all nodes
match(n) return (n)
- 1.
The following focuses on how to pass py2neo Come on Neo4j To operate .
- Query nodes
created_node
=
matcher[
node_id]
print(
created_node)
- 1.
- 2.
- Conditional query
matcher.
match(
' Judgment document ').
where(
name
=
'XXX A criminal judgment ').
first()
- 1.
- Return a node that meets the conditions
temp
=
selector.
match(
'Person').
first()
- 1.
- Add and modify the attribute value of the node
temp[
'name']
=
'001'
- 1.
- labeling
temp.
add_label(
' case ')
graph.
push(
temp)
- 1.
- 2.
- Delete node
graph.
delete(
node)
- 1.
- Create nodes
node
=
Node(
' people ',
name
=
' Zhang San ')
graph.
create(
node)
- 1.
- 2.
Use py2neo Connect to database
from
py2neo
import
Graph,
Node,
Relationship,
Subgraph
from
py2neo.
matching
import
*
graph
=
Graph(
"bolt://localhost:7687",
auth
=(
"neo4j",
"1234"))
success
=
graph.
run(
"UNWIND range(1, 3) AS n RETURN n, n * n as n_sq")
if (
success):
print(
" Successful connection ")
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
summary
py2neo It's an operation Neo4j Of python Third party Library , We can query and use , Very convenient , Focus on the official documents and some key reference documents below .
Reference documents
边栏推荐
- C language - word analysis
- stm32F407-------通用定时器
- Mobile heterogeneous computing technology - GPU OpenCL programming (basic)
- C interview questions_ 20220627 record
- LINQ linked table query
- [stm32 HAL库] 串口通信
- 从SQL注入绕过最新安全狗WAF中学习fuzz
- Add the premise of ganggan
- Advice to friends
- Yyds dry inventory solution sword finger offer: maximum sum of continuous subarrays (II)
猜你喜欢
![[conception de la machine d'état] Moore, Mealy State Machine, Three - stage, Two - stage, one - stage State Machine Writing Specification](/img/48/e29f34aff7cc437bfb574591d54e3d.png)
[conception de la machine d'état] Moore, Mealy State Machine, Three - stage, Two - stage, one - stage State Machine Writing Specification

第二章 经典同步练习作业
![[matlab] function definition and use](/img/43/a7970ca8e075151277f7773434f7db.png)
[matlab] function definition and use

机器学习4-降维技术

Windows10 phpstudy installing redis extension

两栏布局左边图片显示部分由右边内容高度决定

融云通信解决方案 破解企业沟通痛点

At the end of June, how many people in Kangkang are ready to change jobs

Finally, someone explained the cloud native architecture

第五章 虚拟存储器 练习
随机推荐
大三,不简单啊!
[chapter 71 of the flutter problem series] mutual conversion between uint8list and image in flutter
TDD and automated testing
他原来是这么刷题的!
At the end of June, how many people in Kangkang are ready to change jobs
ctfshow XSS
IDC: Alibaba cloud ranks first in the market share of China's data governance platform in 2021
Cs5463 code module analysis (including download link)
LINQ linked table query
Association line exploration, how to connect the two nodes of the flow chart
关联线探究,如何连接流程图的两个节点
Don't ask me how to do UI automation test again
Machine learning 6-decision tree
Lock4j -- distributed locking Middleware -- use / instance
CMake教程(一)
[Chapter 2 of word tutorial series] how to set the table on each page to have a header in word
Design e-commerce seckill system
非科班!自学之路!
ERROR 1067 (42000): Invalid default value for ‘end_ time‘ Mysql
【SSM】报错 Access denied for user ‘WYF‘@‘localhost‘ (using password: YES) 数据的用户名变成了电脑的用户名