题目
题目

COMP4338 COMP5338 (NE) Out of Class Quiz -- Week 8

单项选择题

Which of the following statements is NOT TRUE about this query? MATCH (person:Person{name:"Charlie"}) MERGE(person)-[r:HAS_CHAUFFEUR]->(chauffeur:Chauffeur{name: person.chauffeurName}) RETURN person.name, person.chauffeurName, chauffeur

选项
A.If the graph contains no node with Person label and a name property equal to “Charlie”, the query will execute with no change to the graph.
B.If the Person node with a name property equal to “Charlie” does not have a chauffeurName property, the query will execute with no change to the graph.
C.If the graph contains two Person nodes where each of them has a name property equal to “Chalie” and both nodes have the same value for the chauffeurName property, one Chauffer node will be created and two HAS_CHAUFFEUR relationships will be created.
D.If the graph contains two Person nodes where each of them has a name property equal to “Chalie” and each node has a different value for the chauffeurName property, two Chauffer nodes and two HAS_CHAUFFEUR relationships will be created.
查看解析

查看解析

标准答案
Please login to view
思路分析
To tackle this question, I’ll walk through what each option is saying and compare it to how the Cypher query behaves. Option 1: 'If the graph contains no node with Person label and a name property equal to “Charlie”, the query will execute with no change to the graph.' This is true. The MATCH clause requires a Person node with name = 'Charlie'. If none exists, the pattern fails to match and the MERGE and RETURN parts are not executed, so the graph remains unchanged. Option 2: 'If the Person node with a name property equal to “Charlie” does not have a chauffeurName property, the query will execute with no change to the graph.' Her......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!