advancedTop 30 Scenario-Based Questions
Design a fraud detection system using Neo4j to identify suspicious account networks.
Graph traversal for fraud: 1) Data model: (:Account)-[:TRANSFERS_TO {amount, date}]->(:Account), (:Account)-[:OWNED_BY]->(:Person), (:Person)-[:SHARES_DEVICE {deviceId}]->(:Person). 2) Ring detection (circular transfers): MATCH cycle=(a:Account)-[:TRANSFERS_TO*3..7]->(a) WHERE all(r IN rels(cycle) WHERE r.amount > 1000) RETURN nodes(cycle). 3) Shared device fraud: MATCH (p1:Person)-[:SHARES_DEVICE
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response