官术网_书友最值得收藏!

Preface

Among the NoSQL databases, Neo4j is generating a lot of interest due to the following set of features: performance and scalability, robustness, its very natural and expressive graph model, and ACID transactions with rollbacks.

Neo4j is a graph database. Its model is simple and based on nodes and relationships. The model is described as follows:

  • Each node can have a number of relationships with other nodes
  • Each relationship goes from one node either to another node or the same node; therefore, it has a direction and involves either only two nodes or only one
  • Both nodes and relationships can have properties, and each property has a name and a value

Before Neo4j introduced Cypher as a preferred query, utilizing Neo4j in a real-world project was difficult compared to a traditional relational database. In particular, querying the database was a nightmare, and executing a complex query required the user to write an object, thereby performing a graph traversal. Roughly speaking, a traversal is an operation that specifies how to traverse a graph and what to do with the nodes and relationships found during the visit. Though it is very powerful, it works in a very procedural way (through callbacks), so its readability is poor and any change to the query means modifying the code and building it.

Cypher, instead, provides a declarative syntax, which is readable and powerful, and a rich set of graph patterns that can be recognized in the graph. Thus, with Cypher, you can write (and read) queries much more easily and be productive from the beginning. This book will guide you through learning this language from the ground up, and each topic will be explained with a real-world example.

主站蜘蛛池模板: 梅河口市| 革吉县| 保定市| 托克托县| 措勤县| 错那县| 乌苏市| 台南县| 府谷县| 沈丘县| 驻马店市| 新野县| 都安| 绥化市| 定远县| 湛江市| 星子县| 青阳县| 松江区| 霍林郭勒市| 深泽县| 得荣县| 新巴尔虎右旗| 闻喜县| 和龙市| 塘沽区| 建始县| 蓬溪县| 彭山县| 中方县| 来安县| 武义县| 唐山市| 南开区| 绥阳县| 九龙城区| 钟山县| 称多县| 江阴市| 和田市| 兴仁县|