From aceb383d41b06e2e7495b4e7b07f976e8c1d2b05 Mon Sep 17 00:00:00 2001 From: Shiny Date: Wed, 29 Dec 2021 11:10:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AC=AC=E4=B8=89=E8=8A=82?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=92=8C=E9=97=AE=E7=AD=94=EF=BC=88=E5=8F=88?= =?UTF-8?q?=E6=98=AF3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config.json" | 3 +- .../cypher.json" | 6 +++ .../cypher.md" | 39 +++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 "data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.json" create mode 100644 "data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.md" diff --git "a/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/config.json" "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/config.json" index 25bb645..83c30d7 100644 --- "a/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/config.json" +++ "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/config.json" @@ -1,4 +1,5 @@ { "node_id": "", - "keywords": [] + "keywords": ["Neo4j 查询语言", "Cypher", "Cypher QL"], + "export": ["cypher.json"] } \ No newline at end of file diff --git "a/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.json" "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.json" new file mode 100644 index 0000000..9a7badc --- /dev/null +++ "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.json" @@ -0,0 +1,6 @@ +{ + "type": "code_options", + "author": "shiny", + "source": "cypher.md", + "notebook_enable": false +} \ No newline at end of file diff --git "a/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.md" "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.md" new file mode 100644 index 0000000..495e522 --- /dev/null +++ "b/data/1.Neo4j \345\210\235\351\230\266/3.Neo4j \345\237\272\346\234\254\344\275\277\347\224\250/3.\344\275\277\347\224\250Cypher\346\237\245\350\257\242\346\225\260\346\215\256/cypher.md" @@ -0,0 +1,39 @@ +# Cypher 查询语言初探 + +Neo4j是图数据库,使用原生图数据保存实体和关系,跟关系型数据库不同,图的遍历无法方便地使用SQL来查询。 + +Neo4j提供了名为Cypher的查询语言。Cypher是声明式语言,专注于获取哪些数据和关系,数据库管理系统会处理如何获取这些信息。 + +![](https://dist.neo4j.com/wp-content/uploads/sample-cypher.png) + +Cypher 是独一无二的,因为它提供了一种匹配模式和关系的视觉方式。Cypher 使用 ASCII 字符的语法,其中`(nodes)-[:ARE_CONNECTED_TO]->(otherNodes)`使用圆括号表示节点 `(nodes)`和`-[:ARROWS]->`关系。编写查询时,您可以通过数据绘制图形模式。 + +就像 Neo4j 本身一样,Cypher 是开源的! [openCypher 项目](http://opencypher.org/)提供了所有需要的规范。Cypher 得到了许多公司的支持,所有这些公司都从 Cypher 中受益。 + +拥有 AuraDB 数据库后,您可以在Neo4j Browser中的输入命令`:play cypher`开始学习 Cypher。 + +问题: + +请问Cypher语言获取所有数据的命令是哪一个? + +## 答案 + +`MATCH (n) RETURN n` + +## 选项 + +### A + +`MATCH (n) RETURN n` + +### B + +`SELECT * FROM neo4j` + +### C + +`RETURN *` + +### D + +`g.V()` \ No newline at end of file -- GitLab