Neo4j Extensions
================
Neo4j can be extended by writing custom code which can be invoked directly from Cypher,
as described in the developer manual at https://neo4j.com/docs/developer-manual/current/extending-neo4j/
These extensions are user defined procedures, user defined functions or security plugins. They are written in Java
and compiled into jar files. They can be deployed to the database by dropping a JAR file into the $NEO4J_HOME/plugins
directory on each standalone or clustered server. The database must be re-started on each server to pick up new procedures.
Configuring Procedures
----------------------
There are two configuration settings in $NEO4J_HOME/conf/neoj4.conf that are relevant when deploying procedures
or user defined functions:
* dbms.security.procedures.unrestricted
* dbms.security.procedures.allowlist
These are described in more detail in the documentation at
https://neo4j.com/docs/operations-manual/current/security/securing-extensions/
Sandboxing
----------
Neo4j provides sandboxing to ensure that procedures do not inadvertently use insecure APIs. For example, when writing
custom code it is possible to access Neo4j APIs that are not publicly supported, and these internal APIs are subject
to change, without notice. Additionally, their use comes with the risk of performing insecure actions. The sandboxing
functionality limits the use of extensions to publicly supported APIs, which exclusively contain safe operations,
or contain security checks.
For example:
# Example sandboxing
dbms.security.procedures.unrestricted=my.extensions.example,my.procedures.*
White listing
-------------
White listing can be used to allow loading only a few extensions from a larger library.
The configuration setting dbms.security.procedures.allowlist is used to name certain procedures that should be
available from a library. It defines a comma-separated list of procedures that are to be loaded.
The list may contain both fully-qualified procedure names, and partial names with the wildcard *.
For example, to only load a subset of the APOC library of procedures:
# Example allow listing
dbms.security.procedures.allowlist=apoc.coll.*,apoc.load.*
neo4j.zip,jdk11以上版本可用
需积分: 0 120 浏览量
更新于2023-02-10
收藏 127.75MB ZIP 举报
Neo4j是一个强大的图形数据库系统,它以节点、关系和属性的形式存储数据。与传统的行式或列式数据库不同,Neo4j利用图形结构来表示和操作数据,这使得处理复杂的关系网络变得尤为高效。标题提到"neo4j.zip"表明这是一个包含Neo4j软件的压缩包文件,而"jdk11以上版本可用"提示我们,运行此数据库系统需要Java Development Kit (JDK) 的11版或更高版本。
1. **Neo4j概述**:Neo4j是一个ACID(原子性、一致性、隔离性和持久性)兼容的图数据库,提供高性能的图模型查询语言Cypher,用于创建、查询、更新和删除图中的元素。它支持实时分析和大规模数据集成,适用于社交网络、推荐系统、知识图谱和物联网等多种应用场景。
2. **JDK要求**:由于Neo4j是用Java编写的,因此需要JDK来运行。JDK11是一个长期支持(LTS)版本,它引入了许多新特性,如模块系统(Project Jigsaw)、改进的垃圾收集器(ZGC和Shenandoah)以及新的HTTP客户端API。确保使用JDK11或更高版本可以保证 Neo4j 的稳定运行和兼容性。
3. **安装和配置Neo4j**:解压neo4j.zip后,您将找到包含bin、conf、data、lib等目录的结构。在conf/neo4j.conf配置文件中,可以调整各种设置,如端口、内存分配、数据存储路径等。启动Neo4j,通常需要运行bin目录下的neo4j console命令。
4. **Cypher查询语言**:Cypher是Neo4j的图形查询语言,语法简洁,类似于SQL,但专为图形数据设计。例如,`MATCH (a)-[r]->(b) WHERE a.name = 'John' RETURN b`这条查询语句将查找所有与名为John的节点有关系的其他节点。
5. **图数据模型**:在Neo4j中,数据由节点(表示实体)、关系(连接节点)和属性(附加到节点或关系的数据)组成。节点可以有标签,关系有类型,属性则提供具体的数据值。
6. **性能优化**:为了提高性能,Neo4j支持索引、批处理导入、内建缓存和存储优化策略。例如,对频繁查询的属性创建索引可以显著提升查询速度。
7. **安全性与权限管理**:Neo4j具有内置的身份验证和授权机制,可以通过修改conf/neo4j.conf文件启用。此外,可以使用Cypher进行角色和权限的管理。
8. **图形数据库的优势**:相比传统数据库,图形数据库在处理复杂关系时具有优势,比如快速查找多层关联、进行路径分析和社区检测。在社交网络分析、欺诈检测、知识图谱构建等领域表现出色。
9. **图形数据库的应用场景**:Neo4j适用于需要理解对象之间复杂关系的场景,如社交网络、推荐引擎、供应链分析、生物学研究、地理信息系统和反欺诈。
10. **社区与开发工具**:Neo4j拥有活跃的开发者社区,提供了丰富的开发工具,如Neo4j Browser(一个基于Web的图形化界面)、APOC(Awesome Procedures On Cypher,扩展库)以及各种编程语言的驱动程序,如Java、Python、JavaScript等。
Neo4j是一个功能强大的图形数据库,结合JDK11以上的版本,能为企业和开发者提供处理复杂关系数据的强大能力。正确配置和使用,可以极大地提升数据管理和分析的效率。

IhrMann
- 粉丝: 1
最新资源
- 马克思基本原理概论社会实践调查报告大学生网络道德现状调查.doc
- MATLAB课程设计时钟.doc
- vue-pure-admin-Typescript资源
- 系统集成项目管理工程师知识考题分析.docx
- 网络推广手册规范.docx
- 中国云计算市场研究报告.docx
- 自动化冲压车间工艺(冲次计算、设备规格).doc
- 数字图像处理-图文.pptx
- 数据采集课程设计.doc
- 计算机爱好者协会2023年下半年活动总结.docx
- 搜索引擎优化与营销.pptx
- Go语言设计模式-goDesignPattern-实战源码-Go资源
- 电子商务安全导论名词解释、简答题-.doc
- 航天科工集团网站建设方案.docx
- VB-股市计算器课程设计报告书.doc
- 网络文化艺术节活动策划方案.doc