148
© All Rights Reserved 2013 | Neo Technology, Inc. Graph Databases - How does it work? Pernilla Lindh 1 måndag 15 juli 13 intro me

Pimtechdaydemo

  • View
    815

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Graph����������� ������������������  Databases����������� ������������������  -����������� ������������������  How����������� ������������������  does����������� ������������������  it����������� ������������������  work?

Pernilla����������� ������������������  Lindh

1måndag 15 juli 13intro me

Page 2: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

2måndag 15 juli 13

Page 3: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 4: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Developer Evangelist Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 5: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Developer Evangelist Started at Neo4j 2012

Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 6: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Developer Evangelist Started at Neo4j 2012My Blog: www.p3rnilla.com

Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 7: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Developer Evangelist Started at Neo4j 2012My Blog: www.p3rnilla.comFind me on Twitter: @p3rnilla

Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 8: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

About Me

Developer Evangelist Started at Neo4j 2012My Blog: www.p3rnilla.comFind me on Twitter: @p3rnillaEmail me: [email protected]

Geek Girl Meetup Öresund, Sweden

2måndag 15 juli 13

Page 9: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

(Big)DataNOSQLWhat is a Graph Database, Not?What is a Graph, then?What is a Graph Database?What is Neo4j?

AGENDA

3måndag 15 juli 13

Page 10: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

4måndag 15 juli 13

Page 11: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

http://nostarch.com/mg_databases.htm#reviews

5måndag 15 juli 13

Page 12: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

http://nostarch.com/mg_databases.htm#reviews

5måndag 15 juli 13

Page 13: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

6måndag 15 juli 13

Page 14: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

7måndag 15 juli 13

Page 15: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

7måndag 15 juli 13

Page 16: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

7måndag 15 juli 13

Page 17: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

8måndag 15 juli 13

Page 18: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

9måndag 15 juli 13

Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Databases are set up, so that one set of software programs provides all users with access to all the data.(http://en.wikipedia.org/wiki/Database)

Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Page 19: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

inputting

9måndag 15 juli 13

Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Databases are set up, so that one set of software programs provides all users with access to all the data.(http://en.wikipedia.org/wiki/Database)

Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Page 20: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

inputtingstoring

9måndag 15 juli 13

Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Databases are set up, so that one set of software programs provides all users with access to all the data.(http://en.wikipedia.org/wiki/Database)

Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Page 21: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

inputtingstoringretrieving

9måndag 15 juli 13

Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Databases are set up, so that one set of software programs provides all users with access to all the data.(http://en.wikipedia.org/wiki/Database)

Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Page 22: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

inputtingstoringretrievingmanaging information

9måndag 15 juli 13

Formally, the term "database" refers to the data itself and supporting data structures. Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Databases are set up, so that one set of software programs provides all users with access to all the data.(http://en.wikipedia.org/wiki/Database)

Databases are created to operate large quantities of information by inputting, storing, retrieving, and managing that information.

Page 23: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

DATA???

10måndag 15 juli 13

Page 24: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 25: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 26: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 27: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 28: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 29: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 30: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 31: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 32: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

11måndag 15 juli 13

Computer data is information processed or stored by a computer. This information may be in the form of text documents, images, audio clips, software programs, or other types of data. Computer data may be processed by the computer's CPU and is stored in files and folders on the computer's hard disk. http://www.techterms.com/definition/data

Page 33: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 34: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 35: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 36: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 37: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 38: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 39: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 40: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Data?

Every 2 days we create as much

information as we did up to 2003.”-Eric Schmidt,

Google

12måndag 15 juli 13

So Data is getting bigger as you can see here we are sending 20 million email every second.....

recognize this one? Eric Schmidt Executive Chairman of google, he made a nice quote about big data

Page 41: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

13måndag 15 juli 13

Page 42: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

?

13måndag 15 juli 13

Page 43: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

? BIG DATA

13måndag 15 juli 13

Page 44: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

?

=

BIG DATA

13måndag 15 juli 13

Page 45: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

?

=

BIG DATA

NOSQL

13måndag 15 juli 13

Page 46: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

14måndag 15 juli 13

Page 47: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

15måndag 15 juli 13

Page 48: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

A Swedish Smorgasbord filled with different types of databases

15måndag 15 juli 13

Page 49: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

16måndag 15 juli 13

Page 50: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

SQL

16måndag 15 juli 13

Page 51: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

SQL Structured Query Language

16måndag 15 juli 13

Page 52: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

SQL Relational Database (MySQL)

Structured Query Language

16måndag 15 juli 13

Page 53: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

17måndag 15 juli 13

Page 54: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

17måndag 15 juli 13

Page 55: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

17måndag 15 juli 13

Page 56: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

People

17måndag 15 juli 13

Page 57: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

People Cats

17måndag 15 juli 13

Page 58: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

People CatsPeople_Cats

17måndag 15 juli 13

Page 59: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

People CatsPeople_Cats

17måndag 15 juli 13

Page 60: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

People CatsPeople_Cats

17måndag 15 juli 13

Page 61: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Relational

17måndag 15 juli 13

Page 62: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL (Not Only SQL)

non-relational

open-source (mostly)

cluster-friendly

21st Centery Web

schema optional

18måndag 15 juli 13charachterictics for a nosql database

Page 63: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 64: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 65: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL familyFour types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 66: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 67: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 68: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 69: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 70: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Key Value Stores

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 71: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Key Value Stores

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 72: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Key Value Stores

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 73: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Key Value Stores

Graph Database

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 74: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

NOSQL family

Document-Oriented Database

Column Oriented

Key Value Stores

Graph Database

Four types of NOSQL databases

19måndag 15 juli 13The difference between these databases is the so called datamodel the building blocks that they exposed to the developers

Building blocks for Mongo Db are document in Column Oriented database like Cassandra it’s columnsthe keyvalue stores are key and value

column based on bigtables -

Page 75: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So,����������� ������������������  graphs...

20måndag 15 juli 13

Page 76: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

21måndag 15 juli 13

Page 77: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

22måndag 15 juli 13marshall ”how I meet your mother”

Page 78: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

23måndag 15 juli 13what do google say?

Page 79: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

23måndag 15 juli 13what do google say?

Page 80: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

23måndag 15 juli 13what do google say?

Page 81: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

23måndag 15 juli 13what do google say?

Page 82: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So,����������� ������������������  graphs...

24måndag 15 juli 13

Page 83: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

25måndag 15 juli 13

Page 84: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

What is a graph?

25måndag 15 juli 13

Page 85: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Object (vertex, node)

What is a graph?

25måndag 15 juli 13

Page 86: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Object (vertex, node)

What is a graph?

25måndag 15 juli 13

Page 87: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Object (vertex, node)

Link (edge, arc, relationship)

What is a graph?

25måndag 15 juli 13

Page 88: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Object (vertex, node)

Link (edge, arc, relationship)

What is a graph?

25måndag 15 juli 13

Page 89: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Different Kinds of Graphs

Undirected Graph

Directed Graph

Hyper Graph

26måndag 15 juli 13

Page 90: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

More Kinds Of Graphs

27måndag 15 juli 13

Page 91: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Graph����������� ������������������  databases����������� ������������������  you����������� ������������������  might����������� ������������������  heard����������� ������������������  about

28måndag 15 juli 13

Page 92: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

29måndag 15 juli 13

Page 93: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Most well known graph

29måndag 15 juli 13

Page 94: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Most well known graph

29måndag 15 juli 13

Page 95: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Most well known graph

29måndag 15 juli 13

Page 96: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Most well known graph

29måndag 15 juli 13

Page 97: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Most well known graph

29måndag 15 juli 13

Page 98: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So,����������� ������������������  graphs...

30måndag 15 juli 13

Page 99: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

30måndag 15 juli 13

Page 100: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

what����������� ������������������  are����������� ������������������  they����������� ������������������  good����������� ������������������  at?����������� ������������������  

30måndag 15 juli 13

Page 101: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Highly connected data (social networks)

31måndag 15 juli 13

Page 102: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Highly connected data (social networks)

31måndag 15 juli 13

Page 103: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Highly connected data (social networks)

31måndag 15 juli 13

Page 104: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Highly connected data (social networks)

31måndag 15 juli 13

Page 105: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Recommendations (e-commerce)

32måndag 15 juli 13

Page 106: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Path Finding (how do I know you?)

33måndag 15 juli 13

Page 107: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Path Finding (how do I know you?)

33måndag 15 juli 13

Page 108: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Path Finding (how do I know you?)

33måndag 15 juli 13

Page 109: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Shortest Path (from a -> b)

34måndag 15 juli 13

Page 110: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Shortest Path (from a -> b)

34måndag 15 juli 13

Page 111: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 112: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So what is a Graph Database?

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 113: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So what is a Graph Database?

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 114: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

So what is a Graph Database?

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 115: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 116: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Compered to Relational Database...

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 117: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Compered to Relational Database...

35måndag 15 juli 13a graphdatavase with an ecxlpit graph structure, each node knows its adjacent nodes as the number of nodes increases the cost of a local step or hop remains the same plus an index for lookups

Page 118: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

What is Neo4j?

36måndag 15 juli 13

Page 119: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

What is Neo4j?

36måndag 15 juli 13

Page 120: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

37måndag 15 juli 13

Page 121: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

37måndag 15 juli 13

Page 122: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability)

37måndag 15 juli 13

Page 123: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability)

37måndag 15 juli 13

Page 124: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability) Not many NOSQL databases

have ACID except Neo4j...

37måndag 15 juli 13

Page 125: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability) Not many NOSQL databases

have ACID except Neo4j...

37måndag 15 juli 13

Page 126: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability) Not many NOSQL databases

have ACID except Neo4j...

37måndag 15 juli 13

Page 127: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- High Availability (with Enterprise Edition)

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability) Not many NOSQL databases

have ACID except Neo4j...

37måndag 15 juli 13

Page 128: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Embedded Server

- High Availability (with Enterprise Edition)

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability) Not many NOSQL databases

have ACID except Neo4j...

37måndag 15 juli 13

Page 129: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

- Embedded Server

- High Availability (with Enterprise Edition)

- Property Graph

- Full ACID (atomicity, consistency, isolation, durability)

- REST API

Not many NOSQL databases have ACID except Neo4j...

37måndag 15 juli 13

Page 130: Pimtechdaydemo

© All Rights Reserved 2013 | Neo Technology, Inc.

Modeling the data

38måndag 15 juli 13

Page 131: Pimtechdaydemo

39måndag 15 juli 13

Page 132: Pimtechdaydemo

What do we need

39måndag 15 juli 13

Page 133: Pimtechdaydemo

What do we needPeople

Space Crew

Land Crew

Supply Maps/Navigation System

Time schedule

Spacecraft

$$Money

Astronauts

EngineersManagers

Doctors

operative personal

Admin personal

foodwater Test, test ,testWC

space suits

communication tools

documentation

Mars

Earth

stars

training

fuelSystem

Salaries

clothes

training program

<6 months - from Earth> mars

more research

mars rover

planning

prep timerecovering time Summary

sponsors

smart people

39måndag 15 juli 13

Page 134: Pimtechdaydemo

40måndag 15 juli 13

Page 135: Pimtechdaydemo

41måndag 15 juli 13

Page 136: Pimtechdaydemo

to

participate_in

fly

41måndag 15 juli 13

Page 137: Pimtechdaydemo

to

participate_in

fly

control

works_

in

look_after

look_after

41måndag 15 juli 13

Page 138: Pimtechdaydemo

to

participate_in

fly

control

works_

in

works_at

look_after

look_after

works_atworks_at

part_o

fMars

Mission_To_Mars

Astronaut Pernilla

Spaceship

control_tower

Admin

StinaManager

Lisa

Doctor

MichaelaNASA

Headquarter

41måndag 15 juli 13

Page 139: Pimtechdaydemo

to

participate_in

fly

control

works_

in

works_at

look_after

look_after

works_atworks_at

part_o

fMars

Mission_To_Mars

Astronaut Pernilla

Spaceship

control_tower

Admin

StinaManager

Lisa

Doctor

MichaelaNASA

Headquarter

41måndag 15 juli 13

Page 140: Pimtechdaydemo

to

participate_in

fly

control

works_

in

works_at

look_after

look_after

works_atworks_at

part_o

fMars

Mission_To_Mars

Astronaut Pernilla

Spaceship

control_tower

Admin

StinaManager

Lisa

Doctor

MichaelaNASA

Headquarter

42måndag 15 juli 13

Page 141: Pimtechdaydemo

A graph database =

Nodes and relationships

Nodes RelationshipsMars

Pernilla AstronautAnna Manager

Michaela DoctorLisa Admin

Stina Engineer

Supply

SpaceshipNASA

Control Tower

Mission_to_Mars

Money

goes_into

built

designfly

works_in

look_after

works_at

participate_in

to

manage

pay_mission

43måndag 15 juli 13

Page 142: Pimtechdaydemo

44måndag 15 juli 13

Page 143: Pimtechdaydemo

Cypher - a graph query language

๏ a pattern-matching query language

๏ declarative grammar with clauses (like SQL)

๏ aggregation, ordering, limits

๏ create, read, update, delete, match

44måndag 15 juli 13

Page 144: Pimtechdaydemo

45måndag 15 juli 13

Page 145: Pimtechdaydemo

// create a nodecreate (astronaut:Astronaut {name:"Pernilla", age: 27}),(target:Planet {planet:"Mars"}),

(mission:Mission {mission:"Mission to Mars"});// find nodes match to node 1,2,3MATCH (astronaut)-[:PARTICIPATES_IN]->(mission)-[:TO]->(Planet:planet) where planet.planet = "Mars" RETURN astronaut.name

45måndag 15 juli 13

Page 146: Pimtechdaydemo

// create a nodecreate (astronaut:Astronaut {name:"Pernilla", age: 27}),(target:Planet {planet:"Mars"}),

(mission:Mission {mission:"Mission to Mars"});// find nodes match to node 1,2,3MATCH (astronaut)-[:PARTICIPATES_IN]->(mission)-[:TO]->(Planet:planet) where planet.planet = "Mars" RETURN astronaut.name

45måndag 15 juli 13

Page 147: Pimtechdaydemo

Demohttp://gist.neo4j.org/?5999059

46måndag 15 juli 13

Page 148: Pimtechdaydemo

THANKS!

Questions?

47måndag 15 juli 13