官方网站
git项目地址
中文文档
NoSql图形数据库,嵌入式、高性能、轻量级,面向网络的数据库,它是一个嵌入式的、基于磁盘的、具备完全的事务特性的Java持久化引擎,它将结构化数据存储在网络上而不是表中。
安装
- 安装jdk
-
安装neo4j
bin\Neo4j.bat
localhost:7474
原密码:neoj4 neo4j
修改后密码:neo4j 123456
名词
Nodes - graph data records
Relationships - connect nodes
Properties - named data values
Cypher查询语言--Neo4j中的SQL
Cypher查询语言--Neo4j中的SQL
- Neo4j它支持两种类型的API:
- Neo4j的原生的Java API
- Neo4j的Cypher支架的Java API
create (SpeedAndFurious8:movie{title:'Speed And Furious 8',viewTime:'2017-04-15 20:50',viewer:'zhangsan,lisi'})
create (ADogStory:movie{title:'A Dog\'s Story',viewTime:'2017-03-11 18:50',viewer:'wangwu,zhuqi'})
create (guma:writer{name:'guman',sex:'female'})
create (guma1:writer{name:'guman1',sex:'female',age:35})
create (guma2:writer{name:'guman2',sex:'female',age:25})
match (writer {name:'guman'}) return writer
match (movie {title:'Speed And Furious 8'}) return movie
match(movies:movie) return movies.title limit 5
match(peoples:writer) where peoples.age>30 return peoples
CREATE (n:Person { name: 'Ann' })
CREATE (n:Person { name: 'Dan' })
MATCH (a:Person { name: 'Ann' }), (b:Person { name: 'Dan' }) CREATE (a)-[:KNOWS]->(b)
MATCH p=()-[r:KNOWS]->() RETURN p LIMIT 25
match (n:writer) where n.name=~'.*man.*' return n limit 4
JAVA引用
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.2.0-alpha08</version>