graphdb

33
Internet Programming II Yildiz Technical University 2015 Graph Databases { "name” : "Omer Taskin", "company” : "eBay Inc.", "title” : "Software Engineer" }

Upload: oemer-taskin

Post on 06-Aug-2015

104 views

Category:

Education


0 download

TRANSCRIPT

Page 1: GraphDB

Internet Programming IIYildiz Technical University 2015

Graph Databases

{

"name” : "Omer Taskin",

"company” : "eBay Inc.",

"title” : "Software Engineer"

}

Page 2: GraphDB

OUTLINE

• NoSQL

• Graph

• Graph Algorithms

• Graph DBs

• Neo4j

Page 3: GraphDB

Data is

everything!

in the

Page 4: GraphDB

Data is getting bigger day by day

Page 5: GraphDB

Database

is a thing where data is kept and managed!

Page 6: GraphDB

Database

is a thing where data is kept and managed!

files are databases too

Page 7: GraphDB

Relational Database(s)RDBMS

supports JOIN(s) between tables

invented @IBM in 1970

Page 8: GraphDB

SQL is

Structured Query Language

is a standard language for accessing databases

•SQL became a standard;–American National Standards Institute (ANSI) in 1986– International Organization for Standardization (ISO) in 1987

Page 9: GraphDB
Page 10: GraphDB

Relational Database(s)RDBMS

Every table has to be in a schema

Data has to be stored into table(s)

Page 11: GraphDB

NoSQL

• means Not Only SQL

• Started to use in 2009 @ last.fm

• A Database Management System

• Non-relational!

• No Joins!

• Mostly non-transactional

Page 12: GraphDB
Page 13: GraphDB

Graph TheoryHistory

Seven bridges of Königsberg (Germany)

Found @in 1736

Page 14: GraphDB

Graph TheoryNode Edge And Property

Graphs usually are not small like that

Page 15: GraphDB
Page 16: GraphDB

Graph TheoryGraphDB vs RDBMS

fetching by Join

Graph database

Page 17: GraphDB

Graph AlgorithmsShortest Path

Page 18: GraphDB
Page 19: GraphDB

Graph AlgorithmsGraph Traversal

Page 20: GraphDB
Page 21: GraphDB

Network

Recommendations

Social

Security

Graph DatabasesUse Cases

Page 22: GraphDB

Network and IT Operations Management

The interconnected physical, virtual, and application layers of a network are perfectly modeled in a comprehensive graph.

Queries:

Quality-of-Service Mapping,

Impact Analysis,

Root Cause Analysis,

Asset Management

Graph DatabasesUse Cases

Page 23: GraphDB

Social

Family, friends and followers extend into a social graph which reveals patterns of similar behavior, influence, and implicit groups.

Queries:

Friend Recommendations,

Sharing & Collaboration,

Influencer Analysis

Graph DatabasesUse Cases

Page 24: GraphDB

Recommendations

Connect the dots of seemingly unrelated interests and relationships to make recommendations that balance fresh with familiar.

Queries :

Professional Recommendations

Product,

Social,

Service

Graph DatabasesUse Cases

Page 25: GraphDB

Identity and Access Management

Who you are, how you belong, and what you’re permitted depends upon the relationships between you, an organization, and a system.

Queries :

Interconnected Group Organization,

Access Management,

Provenance

Graph DatabasesUse Cases

Page 26: GraphDB

Graph Databases

Most popular graph database

Open source

Implemented in Java

Neo4j

Page 27: GraphDB

Neo4j

Cypher is query language of Neo4j

Cypher

Page 28: GraphDB

Neo4j

Finding nodes

MATCH (node : Person) RETURN node

Creating node

CREATE (person : Person {name = “Omer”})

Cypher

Page 29: GraphDB

Neo4j

Creating relation for existing node

MATCH (me : Person {name = “Omer”})

CREATE (me)-[:FRIEND]->(friend : Person {name = “Seda”})

Cypher

Page 30: GraphDB

Neo4j

Fetching friends of me

MATCH (me : Person {name = “Omer”})-[:FRIEND]->(friend : Person)

RETURN me, friend;

Cypher

Page 31: GraphDB

Neo4j

Fetching friends of friends of fiends of me

MATCH (me : Person {name = “Omer”})-[f1:FRIEND] -[f2:FRIEND] -[f3:FRIEND]->(f4: Person)

RETURN me, f1, f2, f3, f4;

Cypher

Page 32: GraphDB
Page 33: GraphDB