Questions
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

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 explanation

Log 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!

More Practical Tools for Students Powered by AI Study Helper

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!