[FRENCH] - Neo4j and Cypher - Remi Delhaye

17
Neo4j & Cypher Par ce que (Neo4j) –[:IS_A]–> (NoSQL Database) @rdlhio

description

Slides de ma présentation de "How to Neo4j and Cypher, la puissance des bases de données en graph"

Transcript of [FRENCH] - Neo4j and Cypher - Remi Delhaye

Page 1: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Neo4j & CypherPar ce que

(Neo4j) –[:IS_A]–> (NoSQL Database)

@rdlhio

Page 2: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Neo4j ?- Base de donnée en graphe - Open-source - Éditée par Neo Technology

Des nœuds Des relations

Et c'est tout !

Page 3: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Source : http://assets.neo4j.org/img/propertygraph/graphdb-gve.png

Page 4: [FRENCH] - Neo4j and Cypher - Remi Delhaye

NoSQL (Not only SQL)

Clef Valeur

Et (la aussi) c'est tout !

-->

Page 5: [FRENCH] - Neo4j and Cypher - Remi Delhaye

SPOIL ALERT !

Les fans de Game of Thrones qui n'ont pas vu l'E02S04...

Fermez les yeux !

Page 6: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Source : http://3-ps.googleusercontent.com/x/www.thehollywoodgossip.com/images.thehollywoodgossip.com/iu/t_slideshow/v1397490988/xking-joffrey-poisoned.jpg.pagespeed.ic.wF0WIJvD0a.jpg

Mais c'est MAGNIFIQUE !

Page 7: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Cypher

(Graph) –[:RECORDS_DATA_IN]–> (Nodes) –[:WHICH_HAVE]–> (Properties)

Page 8: [FRENCH] - Neo4j and Cypher - Remi Delhaye

http://www.neo4j.org/download

http://localhost:7474/

Page 9: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Créer des nœuds" C'est toi le nœud ! "

CREATE (Remi:Student { name:'Rémi' })

Page 10: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Séléctionner des nœud

MATCH (Remi:Student) WHERE Remi.name = 'Rémi' RETURN Remi

MATCH (n) RETURN n

Page 11: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Créer des relations

CREATE (Kink:Student { name:'Chuck Norris' })

Page 12: [FRENCH] - Neo4j and Cypher - Remi Delhaye

MATCH (Remi:Student) WHERE Remi.name = 'Rémi' MATCH (Chuck:Student) WHERE Chuck.name = 'Chuck Norris' !CREATE (Remi)-[:LOVES]->(Chuck)

Créer des relations

Page 13: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Créer des relationsMATCH (Remi:Student) WHERE Remi.name = 'Rémi' MATCH (Chuck:Student) WHERE Chuck.name = 'Chuck Norris' !CREATE (Arena:Place {name: 'Arena'}) CREATE (LasVegas:City {name: 'Las Vegas'}) !CREATE (Remi)-[:WILL_FIGHT_IN]->(Arena) CREATE (Chuck)-[:WILL_FIGHT_IN]->(Arena) CREATE (Arena)-[:IS_IN {since: 2004}]->(LasVegas)

Page 14: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Créer des relationsMATCH (n) RETURN n

Page 15: [FRENCH] - Neo4j and Cypher - Remi Delhaye

MATCH (Remi:Student)-[:LOVES]->(someone) WHERE Remi.name = "Rémi" RETURN someone.name

Créer des relations

Page 16: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Un peu de pratique !

Page 17: [FRENCH] - Neo4j and Cypher - Remi Delhaye

Question time !

http://blog.rdlh.iohttp://rdlh.io

Twitter : @rdlhioGitHub : @rdlh