11
Graph Database By Hardik Jain Developer Allerin Tech Pvt Ltd

Graph database

Embed Size (px)

Citation preview

Page 1: Graph database

Graph Database

By

Hardik JainDeveloper

Allerin Tech Pvt Ltd

Page 2: Graph database

What is Graph Database ?

Why Graph Database ?

Page 3: Graph database

Graph Database

Page 4: Graph database

Power of Graph Databases

● Performance

● Flexibility

● Agility

Page 5: Graph database

Performance comparison

Depth RDBMS Execution time Neo4j execution time Records returned

2 0.016 0.01 ~2500

3 30.267 0.168 ~110,000

4 1543.505 1.359 ~600,000

5 Unfinished 2.132 ~800,000

Page 6: Graph database

Relational database is not good for

relationship data - join

Page 7: Graph database

Cypher Query

Cypher query clauses

● START

● MATCH

● RETURN

● WHERE

● CREATE

● DELETE

● SET

● UNION

Page 8: Graph database

● Beginning a QuerySTART clause is used to begin a cypher query

● Declaring Information Patterns to Find

START english = node:language(name = ‘English’)

berlin = node:city(name = ‘Berlin’)

korth = node:author(name = 'korth')

MATCH () - [:KNOWS] - > (english) - [:LIVES_IN] -> (berlin) - [:read] ->(book) -

[:wrritten_by]- > (korth)

RETURN book.title AS title

Page 9: Graph database

● Constraining Matches

For constraint matching WHERE clause is used

● Processing Results

The RETURN clause in cypher is used to return the query results.

START english = node:language(name = ‘English’)

berlin = node:city(name = ‘Berlin’)

korth = node:author(name = 'korth')

MATCH () - [:KNOWS] - > (english) - [:LIVES_IN] -> (berlin) - [:read] -> (book) -

[:wrritten_by]- > (korth)

WHERE book.publication_year > 2000

RETURN book.title AS title

Page 10: Graph database

Conclusion● It is best suited for multi relation applications.

● Used by following companies.● Gartner

● eBay

● Walmart

● telenor ..etc

Page 11: Graph database

Thank You!