- 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
- Mastering Zabbix(Second Edition)
- Internet of Things with the Arduino Yún
- Scratch 3.0少兒編程與邏輯思維訓(xùn)練
- Java程序設(shè)計:原理與范例
- 零基礎(chǔ)學(xué)單片機C語言程序設(shè)計
- Python數(shù)據(jù)結(jié)構(gòu)與算法(視頻教學(xué)版)
- 常用工具軟件立體化教程(微課版)
- Clojure for Machine Learning
- Learning Modular Java Programming
- Java Web開發(fā)實例大全(基礎(chǔ)卷) (軟件工程師開發(fā)大系)
- Web開發(fā)新體驗
- Game Development Patterns and Best Practices
- MySQL數(shù)據(jù)庫應(yīng)用技術(shù)及實戰(zhàn)
- Python網(wǎng)絡(luò)運維自動化
- 測試基地實訓(xùn)指導(dǎo)