Neo4j

Neo4j is a graph database management system developed by Neo Technology, Inc. Described by its developers as an ACID-compliant transactional database with native graph storage and processing,[3] Neo4j is the most popular graph database according to db-engines.com.[4]

Neo4j is available in a GPL3-licensed open-source "community edition", with online backup and high availability extensions licensed under the terms of the Affero General Public License. Neo also licenses Neo4j with these extensions under closed-source commercial terms.[5]

Neo4j is implemented in Java and accessible from software written in other languages using the Cypher Query Language through a transactional HTTP endpoint, or through the binary 'bolt' protocol.[6][7][8][9]

Version 1.0 was released in February 2010.[10]

Neo4j version 2.0 was released in December 2013.[11]

In November 2016 Neo4j successfully secured $36M in Series D Funding led by Greenbridge Partners Ltd [12]

Licensing and editions[edit]

Neo4j comes in 3 editions: Community; Enterprise; and Government. It is dual-licensed: GPLv3; and AGPLv3 / commercial. The Community Edition is free but is limited to running on 1 node only due to the lack of clustering and is without hot backups.[13]

The Enterprise Edition (which requires buying a license unless the application built on top of it is open-sourced) unlocks these limitations, allowing for clustering, hot backups, and monitoring. The Government Edition extends the Enterprise Edition adding additional government specific services including FISMA-related certification and accreditation support.[citation needed]

Data structure[edit]

In Neo4j, everything is stored in the form of either an edge, a node, or an attribute. Each node and edge can have any number of attributes. Both the nodes and edges can be labelled. Labels can be used to narrow searches. As of version 2.0, indexing was added to Cypher with the introduction of schemas.[14] Previously, indexes were supported separately from Cypher.[15]

Neo technology[edit]

Neo4j is developed by Neo Technology, Inc., based in the San Francisco Bay AreaUnited StatesNorth America, and also in MalmöSwedenEurope. The Neo Technology board of directors consists of Rod Johnson (founder of the Spring Framework), Chris Barchak (Partner at Conor Venture Partners), Magnus Christerson (Vice President of Intentional Software Corp), Nikolaj Nyholm (Partner at Sunstone Capital), Guarav Tuli (Principal at Fidelity Growth Partners), and Johan Svensson (CTO of Neo Technology).[16]


### Neo4j 数据库使用指南与下载 Neo4j 是一种流行的图数据库,支持复杂的节点和关系建模。以下是关于 Neo4j 的使用指南与下载方法的详细介绍。 #### 1. 下载 Neo4j 用户可以从官方网站下载 Neo4j 数据库。具体步骤如下: - 访问 [Neo4j 官方网站](https://neo4j.com/)。 - 在下载页面选择适合的操作系统版本(如 Windows、macOS 或 Linux)[^1]。 - 下载完成后,按照安装向导完成安装过程。 #### 2. 初次登录与密码修改 初次启动 Neo4j 数据库时,默认用户名和密码均为 `neo4j/neo4j`。首次登录后,系统会强制要求修改密码以增强安全性。修改密码可以通过以下 Cypher 查询实现: ```cypher ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO 'new_password'; ``` 上述查询将当前用户的密码从默认值更改为新密码 `new_password`[^1]。 #### 3. 创建节点与关系 Neo4j 使用 Cypher 查询语言进行数据操作。以下是创建节点和关系的基本示例: - 创建一个名为 `Alice` 的员工节点: ```cypher CREATE (e:Employee {id: 1, name: 'Alice', salary: 8000}); ``` - 如果节点已存在,则可以使用 `MERGE` 关键字避免重复创建: ```cypher MERGE (e:Employee {id: 1, name: 'Alice'}); ``` - 创建两个人员节点并建立关系: ```cypher CREATE (p1:Person {name: 'Alice'}); CREATE (p2:Person {name: 'Bob'}); CREATE (p1)-[:KNOWS]->(p2); ``` 上述代码展示了如何使用 Cypher 语言存储数据[^2]。 #### 4. APOC 扩展功能 APOC 是 Neo4j 的一个扩展库,提供了许多高级功能。例如,生成完全图的功能可以通过以下查询实现: ```cypher CALL apoc.generate.complete(['A', 'B', 'C'], 'CONNECTED'); ``` 此查询将在节点列表 `['A', 'B', 'C']` 中生成一个完全图,并为每对节点创建 `CONNECTED` 类型的关系[^3]。 #### 5. 性能优化与索引 为了提高查询性能,建议为频繁查询的属性创建索引。例如: ```cypher CREATE INDEX FOR (n:Person) ON (n.name); ``` 此命令为 `Person` 节点的 `name` 属性创建了一个索引,从而加速基于该属性的查询[^2]。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值