Graph the Planet!

23
GRAPH THE PLANET! Introduction to the world of circles and arrows

Transcript of Graph the Planet!

Page 1: Graph the Planet!

GRAPH THE PLANET!Introduction to the world of circles and arrows

Page 2: Graph the Planet!

WHO ARE YOU AGAIN?

Sean Copenhaver

GIS

Columbia, SC

Twitter : @copenhas

Github: copenhas

VainGlory: copenhas

Page 3: Graph the Planet!

WHAT IS A GRAPH?

Page 4: Graph the Planet!

NODES/VERTICES

Page 5: Graph the Planet!

NODES/VERTICES

Page 6: Graph the Planet!

RELATIONSHIPS/EDGES

Page 7: Graph the Planet!

RELATIONSHIPS/EDGES

Page 8: Graph the Planet!

A GRAPH

Page 9: Graph the Planet!

WHAT DO YOU DO WITH IT?

Page 10: Graph the Planet!

TRAVERSE IT

Page 11: Graph the Planet!

QUICK ASIDE TO RDBMSArtist Album

User UserLikes

Page 12: Graph the Planet!

WHAT BANDS WOULD

COPENHAS LIKE?

Page 13: Graph the Planet!

LET’S TRAVERSE THE TABLES

select Artist.Name from User join UserLikes on User.Id = UserLikes.UserId join Album on UserLikes.AlbumId = Album.Id join Artist on Album.ArtistId = Artist.Id where User.Name = 'copenhas'

Page 14: Graph the Planet!

JOIN BOMB

Page 15: Graph the Planet!

CAN A GRAPH DB HELP?

Page 16: Graph the Planet!

LET’S TRAVERSE THE TABLES AGAIN

match (user:User)-[:LIKES]->(album:Album) match album<-[:RELEASED]-(artist:Artist) where user.Name = ‘copenhas' return artist.Name

Page 17: Graph the Planet!

MAYBE USE A DOC DB?

{ "name": "Blind Guardian", "origin": "Germany", "genre": "Power Metal", "releases": [ { "name": "Nightfall in Middle-Earth", "year": 1998, "label": "Virgin" } ] }

Page 18: Graph the Planet!

MAYBE USE A DOC DB?

Joins are due to normalization

You wouldn’t miss that normalization

Data has few and shallow relationships

Page 19: Graph the Planet!

BENEFITS OF GRAPH DATABASES

Whiteboard friendly

Just as flexible as a document DB (almost)

“Index-free adjacency”

Graphs love relationships

Page 20: Graph the Planet!

NEO4J

Page 21: Graph the Planet!

IT’S GOT WHAT YOU NEED

ACID Transactions

Schemas (limited), indexes

Built in graph algorithms

Query language (Cypher)

Page 22: Graph the Planet!

HIGH AVAILABILITY

Montag, David. (2013). Understanding Neo4j Scalability. Available: http://info.neo4j.com/rs/neotechnology/images/Understanding%20Neo4j%20Scalability%282%29.pdf. Last accessed 10th April 2015.

Page 23: Graph the Planet!

NOT TO MENTION NEO4J BROWSER!