Graph Database
By
Hardik Jain
Developer
Allerin Tech Pvt Ltd
What is Graph Database ?
Why Graph Database ?
Graph Database
Power of Graph Databases
● Performance
● Flexibility
● Agility
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
Relational database is not good for
relationship data - join
Cypher Query
Cypher query clauses
● START
● MATCH
● RETURN
● WHERE
● CREATE
● DELETE
● SET
● UNION
● Beginning a Query
START 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
● 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
Conclusion
● It is best suited for multi relation applications.
● Used by following companies.
● Gartner
● eBay
● Walmart
● telenor ..etc
Thank You!

Graph database

  • 1.
  • 2.
    What is GraphDatabase ? Why Graph Database ?
  • 3.
  • 4.
    Power of GraphDatabases ● Performance ● Flexibility ● Agility
  • 5.
    Performance comparison Depth RDBMSExecution 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
  • 6.
    Relational database isnot good for relationship data - join
  • 7.
    Cypher Query Cypher queryclauses ● START ● MATCH ● RETURN ● WHERE ● CREATE ● DELETE ● SET ● UNION
  • 8.
    ● Beginning aQuery START 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
  • 9.
    ● Constraining Matches Forconstraint 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
  • 10.
    Conclusion ● It isbest suited for multi relation applications. ● Used by following companies. ● Gartner ● eBay ● Walmart ● telenor ..etc
  • 11.