Questions
COMP4338 COMP5338 (NE) Out of Class Quiz -- Week 8
Single choice
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
Options
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.
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
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 explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
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
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!