Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Prochain SlideShare
Chargement dans…5
×

# Intro to Cypher

582 vues

Publié le

This developer-focused webinar will explain how to use the Cypher graph query language. Cypher, a query language designed specifically for graphs, allows for expressing complex graph patterns using simple ASCII art-like notation and offers a simple but expressive approach for working with graph data.

During this webinar you'll learn:
-Basic Cypher syntax
-How to construct graph patterns using Cypher
-Querying existing data
-Data import with Cypher
-Using aggregations such as statistical functions
-Extending the power of Cypher using procedures and functions

Publié dans : Technologie
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Soyez le premier à commenter

### Intro to Cypher

1. 1. Intro to Cypher August 2017William Lyon @lyonwj
2. 2. William Lyon Developer Relations Engineer @neo4j will@neo4j.com @lyonwj lyonwj.com
3. 3. Agenda - Introduction To Cypher • Neo4j Overview • Cypher Overview • Hands On Intro To Cypher • Resources • Q&A
4. 4. neo4j.com/developer
5. 5. Neo4j Graph Database
6. 6. https://offshoreleaks.icij.org/pages/database
7. 7. https://arxiv.org/pdf/1004.1001.pdf
8. 8. What is Cypher? Declarative Query Language openCypher Graph Pattern Matching Bolt / Drivers Human Readable
9. 9. What is Cypher? Declarative Query Language • What data we want, not how
10. 10. What is Cypher? Graph Pattern Matching (node)-[:RELATIONSHIP]->(node) • What data we want, not how • Expressiveness
11. 11. What is Cypher? Graph Pattern Matching (node {key: value})-[:RELATIONSHIP]->(node) • What data we want, not how • Expressiveness
12. 12. What is Cypher? Graph Pattern Matching (node {key: value})-[:RELATIONSHIP*..2]->(node) • What data we want, not how • Expressiveness
13. 13. What is Cypher? Human Readable (node)-[:RELATIONSHIP]->(node) • Focus on domain, not database
14. 14. What is Cypher? openCypher • Open standard for graph querying http://www.opencypher.org/
15. 15. What is Cypher? Bolt / Drivers • Binary protocol for Neo4j
16. 16. What is Cypher? Bolt / Drivers • Language Drivers
17. 17. What is Cypher? Bolt / Drivers
18. 18. What is Cypher? Bolt / Drivers
19. 19. Querying The Graph
20. 20. The Data
21. 21. https://www.yelp.com/dataset_challenge
22. 22. Yelp Data Challenge In Neo4j https://github.com/johnymontana/neo4j-datasets/tree/master/yelp “Working With A Real-World Dataset In Neo4j” https://youtu.be/oXziS-PPIUA
23. 23. Graph Data Model
24. 24. Labeled Property Graph Model
25. 25. Labeled Property Graph Model
26. 26. The Data user.json business.json review.json
27. 27. Our Data Model http://www.apcjones.com/arrows/# • Identify “entities” • What properties are relevant? • Identify unique ids • Find connections • Repeat
28. 28. The Graph
29. 29. Querying The Graph
30. 30. What Breweries Near Me That My Friends Also Like Have The Highest Rating?
31. 31. What Breweries Near Me That My Friends Also Like Have The Highest Rating?
32. 32. What Breweries Near Me That My Friends Also Like Have The Highest Rating? • MATCH … • (node)-[:RELATIONSHIP]->(node) • Predicates • Aggregations • Ordering • Graph vs tabular data
33. 33. PROFILE / EXPLAIN • Query execution plan • Declarative vs imperative • Performance tuning
34. 34. CREATE INDEX … • Indexes are only used to find the starting point for queries. Use index scans to look up rows in tables and join them with rows from other tables Use indexes to find the starting points for a query. Relational Graph
35. 35. Spatial functionality
36. 36. Extending Cypher - Procedures and Functions • Code deployed to database • Callable from Cypher • APOC library • data import • graph algorithms • periodic iterate • MUCH more… • Neo4j Spatial • Neo4j-GraphQL
37. 37. Extending Cypher - Procedures and Functions • PageRank - friend with highest PageRank?
38. 38. Resources
39. 39. Cypher Refcard https://neo4j.com/docs/cypher-refcard/current/
40. 40. openCypher opencypher.org
41. 41. Neo4j Developer Page neo4j.com/developer
42. 42. Neo4j Sandbox neo4jsandbox.com