- Learning Neo4j 3.x(Second Edition)
- Jér?me Baton Rik Van Bruggen
- 457字
- 2021-07-08 09:37:39
A declarative query language - Cypher
One of the defining features of the Neo4j graph database product today is its wonderful query language called Cypher. Cypher is a declarative, pattern-matching query language that makes graph database management systems understandable and workable for any database user--even the less technical ones.
The key characteristic of Cypher, in my opinion, is that it is a declarative language, opposed to other imperative query languages that have existed for quite some time. Why is this so important? Here are your answers:
- Declarative languages allow you to state what you're looking for, declare
the pattern that you would like to see retrieved, and then let the database worry about how to go about retrieving that data.- In an imperative (query) language, you would have to tell the database specifically what to do to get to the data and retrieve it.
- Declarative languages separate the concern of stating the problem from solving it. This allows greater readability of the queries that you write, which is important, as people tend to read their database queries more often than they write them. This piece of your software will therefore become more readable and shareable with others, and long term maintenance of that easy-to-read query becomes so much easier.
- Declarative languages will allow the database to use the information about the nature and structure of the data that it holds to answer your question more efficiently. Essentially, it allows query optimizations that you would never have known of or thought about in an imperative approach. Therefore, declarative languages can be faster--at least over time, as the optimization algorithms mature.
- Declarative languages are great for ad hoc querying of your database, without you having to write complex software routines to do so.
Part of the reason why I feel that Cypher is such an important part of Neo4j is that we know that declarative languages, especially in the database management systems world, are critical to mass adoption. Most application developers do not want to worry about the nitty-gritty of how to best interact with their data. They want to focus on the business logic and that the data should just be there when I want it, as I want it. This is exactly how relational database systems evolved in the seventies . (Refer to Chapter 1, Graph Theory and Databases.) It is highly likely that we will be seeing a similar evolution in the graph database management system space. Cypher, therefore, is in a unique position and makes it so much easier to work with the database. It is already an incredible tool today, and it will only become better with time and the OpenCypher initiative. Cypher will be covered in Chapter 4, Getting Started with Cypher
- 潮流:UI設計必修課
- Effective C#:改善C#代碼的50個有效方法(原書第3版)
- 軟件界面交互設計基礎
- Java程序設計與計算思維
- 假如C語言是我發明的:講給孩子聽的大師編程課
- 基于Swift語言的iOS App 商業實戰教程
- Python數據可視化之Matplotlib與Pyecharts實戰
- Working with Odoo
- 計算機應用基礎案例教程
- Mastering Web Application Development with AngularJS
- Scala Data Analysis Cookbook
- Python計算機視覺與深度學習實戰
- 體驗之道:從需求到實踐的用戶體驗實戰
- 計算機應用基礎(Windows 7+Office 2010)
- Python深度學習(第2版)