当前位置:网站首页>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
边栏推荐
- CMake教程(一)
- Mobile heterogeneous computing technology - GPU OpenCL programming (basic)
- 【Flutter 問題系列第 71 篇】Flutter 中 Uint8List 和 Image 之間的相互轉換
- Thinking about lever
- Small sample sharp weapon 2 Text confrontation + semi supervised FGSM & VAT & FGM code implementation
- [matlab]函数定义与使用
- [chapter 71 of the flutter problem series] mutual conversion between uint8list and image in flutter
- 笔记
- 自媒体行业内卷严重:企业自媒体应该何去何从
- 【Word 教程系列第 2 篇】Word 中如何设置每页的表格都有表头
猜你喜欢

IDC: Alibaba cloud ranks first in the market share of China's data governance platform in 2021

第四章 存储器管理练习

【Word 教程系列第 1 篇】如何去除 Word 表格中的箭头

Analysis of CSRF Cross Site Request Forgery vulnerability

Chapter IV memory management exercise
![[Chapter 2 of word tutorial series] how to set the table on each page to have a header in word](/img/1a/8416d2c48bf1ddcc45e0c5d9acf242.png)
[Chapter 2 of word tutorial series] how to set the table on each page to have a header in word

2022年PMP项目管理考试敏捷知识点(4)

C# 面试题目_20220627记录一下

C interview questions_ 20220627 record

With a monthly salary of 60000 yuan, such people began to be robbed after the Internet "reduced costs and increased efficiency"
随机推荐
ctfshow XSS
note
Puma joins hands with 10ktf shop to launch its Web3 cooperation project with the largest scale so far
MATLAB 学习笔记(6)MATLAB 的 upsample 函数和 downsample 函数
The picture display on the left of the two column layout is determined by the content height on the right
pymysql. Error get error code and specific error information
urllib.parse 解析url连接中的参数
股票开户在网上开通安全吗?
10. Standard i/o redirection and pipeline
华为22级专家十年心血终成云原生服务网格进阶实战文档,是真的6
C# 面试题目_20220627记录一下
笔记
Don't ask me how to do UI automation test again
两栏布局左边图片显示部分由右边内容高度决定
VSCode里使用条件断点(基于GDB)
ctfshow XSS
[stm32 Hal library] RTC and BKP drives
Didn't find an internship. He summed it up
Save data in Excel: use openpyxl to create multiple tables and set excel row limit
【SSM】报错 Access denied for user ‘WYF‘@‘localhost‘ (using password: YES) 数据的用户名变成了电脑的用户名