Introduction of neo4j

17
グラフDB Neo4j のご紹介 Kunihiko Ito ESM 西日暮里.rb 2016-04-28

Transcript of Introduction of neo4j

Page 1: Introduction of neo4j

グラフDB Neo4j のご紹介Kunihiko Ito

ESM西日暮里.rb2016-04-28

Page 2: Introduction of neo4j

はじめまして

Page 3: Introduction of neo4j

西日暮里.rb

Page 4: Introduction of neo4j

参加2回目です

Page 5: Introduction of neo4j

p self

名前: 伊藤 邦彦

所属: ESM アジャイル事業部

Page 6: Introduction of neo4j

github@kunitoo

Page 7: Introduction of neo4j

twitter@kunitoo

Page 8: Introduction of neo4j

今日伝えたいこと

RDBMS 以外にもデータベースはあるんだよ

Page 9: Introduction of neo4j

Neo4j とは

- NoSQL に分類される

# https://ja.wikipedia.org/wiki/Neo4jNeo4jはJavaで実装された、オープンソースの最も人気のあるグラフデータベースである。

Page 10: Introduction of neo4j

グラフデータベースとは

グラフ構造を扱うことのできるデータべース

Page 11: Introduction of neo4j

グラフ構造

# https://ja.wikipedia.org/wiki/グラフ_(データ構造)グラフ(英: Graph)とは、ノード(頂点)群とノード間の連結関係を表すエッジ(枝)群で構成される抽象データ型、and・orその実装である具象データ型である。グラフ理論によるグラフの実装であり、同理論にもとづく豊富なアルゴリズムの基盤である。

Page 12: Introduction of neo4j

こんなの

Page 13: Introduction of neo4j

クエリ

Cypher Query Language

MATCH (u:User)-[rel:friends]->(:User)RETUN distinct(u)

Page 14: Introduction of neo4j

Ruby から触るには

Page 15: Introduction of neo4j

Neo4jrb

Page 16: Introduction of neo4j

例題

https://gist.github.com/mattsan/07674b095908fda117a0

Page 17: Introduction of neo4j

Neo4j を使ってどう解くか

https://gist.github.com/kunitoo/7eb3464a1c8b55353195