题目
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道考试原题与详细解析,现在登录,立即获得答案。
类似问题
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
People born without creativity never can develop it
A product has a selling price of $20, a contribution margin ratio of 40% and fixed cost of $120,000. To make a profit of $30,000. The number of units that must be sold is: Type the number without $ and a comma. Eg: 20000
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!