Questions
Questions

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

Multiple choice

Which queries find people who both acted in and directed the same movie in neo4j's  sample Movie Graph? Select all that apply. 

Options
A.MATCH (p:Person)-[DIRECTED]->(m:Movie) WHERE (p)-[:ACTED_IN]->(m) RETURN p.name, m.title;
B.MATCH (p:Person), (m:Movie)   WHERE (p)-[:ACTED_IN]->(m) AND (p)-[:DIRECTED]->(m)   RETURN p.name, m.title;
C.MATCH (p:Person)-[:ACTED_IN]->(m:Movie)<-[:DIRECTED]-(p) RETURN p.name, m.title;
D.MATCH (p:Person)-[:ACTED_IN]->(m:Movie) WHERE (p)-[:DIRECTED]->(m) RETURN p.name, m.title;
View Explanation

View Explanation

Verified Answer
Please login to view
Step-by-Step Analysis
Let’s break down what the question is asking: identify queries that return people who both acted in and directed the same movie in the Movie Graph. Each option will be assessed on whether it enforces that p is the same person for both acting and directing a given movie m. Option 1: MATCH (p:Person)-[DIRECTED]->(m:Movie) WHERE (p)-[:ACTED_IN]->(m) RETURN p.name, m.title; This starts by finding a person p who directed a movie m, and......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!