当前位置:网站首页>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
边栏推荐
- Hesitating root sound
- O & M troubleshooting - use hcache plug-in to troubleshoot excessive buffer/cache occupancy
- 两栏布局左边图片显示部分由右边内容高度决定
- [state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification
- stm32F407-------通用定时器
- 他原来是这么刷题的!
- 【狀態機設計】Moore、Mealy狀態機、三段式、二段式、一段式狀態機書寫規範
- With a monthly salary of 60000 yuan, such people began to be robbed after the Internet "reduced costs and increased efficiency"
- Save data in Excel: use openpyxl to create multiple tables and set excel row limit
- [word Tutorial Series Part 1] how to remove arrows in word tables
猜你喜欢

ctfshow XSS

再次上榜!知道创宇入选2022中国网安产业竞争力50强

机器学习6-决策树

【软件分析】软件分析、设计与建模迭代式详解

ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql

Learning fuzzy from SQL injection to bypass the latest safe dog WAF

window10 phpstudy 安装redis扩展

Machine learning 4-dimension reduction technology
![[mathematical modeling] fmincon() function of MATLAB nonlinear programming](/img/fc/46949679859b1369fcc83d0d8b637c.png)
[mathematical modeling] fmincon() function of MATLAB nonlinear programming

Be on the list again! Know that Chuangyu was selected as one of the top 50 competitive enterprises in China's network security industry in 2022
随机推荐
Use conditional breakpoints in vscode (based on GDB)
[state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification
PHP利用CURL实现登录网站后下载Excel文件
Is the account opening of Guosheng securities really safe and reliable
Do you know all the wonderful functions of the vlookup function?
How to solve the database type error in the operation of the servert project?
在DialogFragment的onStop(完全不可见)时调用dismiss退出界面报错解决办法
第五章 虚拟存储器 练习
百度知道爬虫,根据问题id,线索id,评论id获取评论下面的对话
[stm32 Hal library] RTC and BKP drives
融云通信解决方案 破解企业沟通痛点
笔记
[matlab] function definition and use
Didn't find an internship. He summed it up
frameworks/base/core/res/res/values/symbols. Xml:3915: error: no definition for declared symbol solution
【狀態機設計】Moore、Mealy狀態機、三段式、二段式、一段式狀態機書寫規範
What will be done after digital IC Verification?
一张能卖上千万,商家扩张比玩家还快:球星卡的江湖你不懂
[conception de la machine d'état] Moore, Mealy State Machine, Three - stage, Two - stage, one - stage State Machine Writing Specification
Would like to ask, how to open a stock account? Is it safe to open an account online?