Neo4j · Getting started

Foreword

Relations, refers to the interaction between things affect each state.

The relationship between the data too, the relationship between data stored in the RDS has already begun. From the foreign key database support, and to relational tables manually created, it has taken many ways, just to solve complex queries, slow and other issues.

The rise in the NoSQL today, map database into our field of vision, the relational model static, rigid, inflexible nature already ceased to exist in the storage network-like structure inside. Now, let us as a beginner, Study secret map database.

FIG graphics database structure (i.e., network-like) is stored in the form data, he "node" as the basic unit of storage, between the "nodes" by the "relation" as a related "node" and "relationship" may contain a number of "properties", as in the RDS "row", "column", a graphical map database storage structure.

A comparison chart found on the network

Neo4j

Neo4j is a world-leading map database with native graphics storage and processing capabilities, has a convenient display, supports a wide range, superior performance advantages.

Contains a flexible architecture, complete transaction management, clustering in order to improve the availability and performance, powerful Cypher (CQL) query language, visual Web interface Neo4j Browser, driver support popular language and framework for easy data import, mature cloud services and other features.

neo4j logo

start using

Neo4j installation of each system neither the same description is omitted, all of you to look for trouble.

(PS: Because relatively new, multi-system support, installation, most of them can be installed directly, a change of configuration can be used)

The default port:

http:7474

https:7473

bolt:7687

The default account name and password:

Account : neo4j

Password : neo4j

Neo4j browser

Neo4j Browser that is Neo4j browser page is Neo4j comes with visual interface, direct access to the finish after starting Neo4j HTTP: // your domain name: 7474 / browser / to visit, the first visit need to set a password.

在设置完账号密码之后,即进入了主页面,主页面主要分为三个部分,即左边的菜单栏,右下边的数据展示部分,右上方的CQL录入部分。
其中菜单栏分为:

数据库信息:展示数据库已有的数据信息

收藏的CQL:展示已收藏的CQL,也包含了CQL的语句样例

文件资料:包含了基础教程、帮助、相关资源等信息

系统设置:主要为页面设置、结果展示设置、图形可视化设置

数据库信息菜单栏则分为:

节点列表:展示所有节点

关系列表:展示所有关系

字段列表:展示了所有节点的所有字段

连接信息:包含了当前的连接信息,以及一些操作语句

数据库信息包含了数据库版本信息以及系统信息查询语句

SpringBootData

Neo4j支持多种语言,无论使用Java,C#,Python,Ruby,JavaScript,PHP,R还是Go,Neo4j社区都构建了驱动程序,使得与Neo4j的HTTP API的交互变得容易。同时支持流行的框架,例如Spring Data,Django ORM,Laravel,JDBC等。这里,我们只说说SpringBootData。

SpringBootData使用Neo4j所需要的依赖如下:

  <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-data-neo4j</artifactId>
       <version>version</version>
  </dependency>
  
  <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-data-neo4j</artifactId>
       <version>version</version>
  </dependency>

基础的配置文件如下:

spring:
  data:
    neo4j:
      uri: bolt://www.clevercoder.cn/:7687
      username: neo4j
      password: neo4j

更多配置:

spring:
    data:
        neo4j:
            connection:
                pool:
                    size:#连接池大小
                livenes:
                  check:
                    timeout:#see Java driver doc
            encryption:
                level:#加密级别
            trust:
                strategy:#信任策略,默认TRUST_ALL_CERTIFICATES(信任所有证书)
                certificate:
                    file:#若填写了TRUST_CUSTOM_CA_SIGNED_CERTIFICATES
                    #或TRUST_SYSTEM_CA_SIGNED_CERTIFICATES需要的文件路径     
            verify:
                connection: #see Java driver doc

在使用SpringBootData的情况下,配置完成即可直接使用了,后续将介绍如何方便快捷的在SpringBootData里使用Neo4j。

结语

neo4j as popular map database, it also supports java very well, you can easily use GraphDatabaseService class java native to operate, but also through the Repository SpringData to operate. More convenient Neo4j comes with a graphical management interface, even if there is no code base of people who can easily use it for mapping, for example, know almost have to make a star A primary use Neo4j graph. We can also easily see the results of operations of the code on the page.

We will explain each subsequent Neo4j use a variety of ways, so stay tuned!

Guess you like

Origin www.cnblogs.com/tinging/p/12088259.html