Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Graph db

378 views

Published on

  • Be the first to comment

  • Be the first to like this

Graph db

  1. 1. Imran Ahmed August 2015 Graph is Everywhere !!! An Introduction to Graph Databases and Neo4j
  2. 2. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Agenda  No SQL Overview  Graph Databases  Comparison with RDBMS  What is Neo4j?  Cypher Query Language  How to migrate ?  Real-world implementation use cases with Neo4j  Install and Deploy  Conclusion
  3. 3. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. What is NOSQL ? It’s not “No to SQL” It’s not “Never SQL” It’s “Not only SQL” NOSQL describes the ongoing trends where we as developers searching for different options based on changing requirements. BTW what is changing and why we need NOSQL ?  Data is getting bigger…  Data is more connected…  Data is more semi-structured…
  4. 4. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Types of NOSQL…
  5. 5. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Types of NOSQL… Key-Value • A hash table where there is a unique key and a pointer to a particular item of data. E.g.: Oracle BDB, Amazon Simple DB etc. Column (Big Table) • There are still keys but they point to multiple columns. The columns are arranged by column family. • Supports Large amount of Data. E.g.: Cassandra, HBase. Document • The semi-structured documents are stored in formats like JSON. Supports Large amount of Data. • These were inspired by Lotus Notes and are similar to key-value stores. E.g.: CouchDB, MongoDB.
  6. 6. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc.
  7. 7. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. What is Graph DB ? A Database with explicit graph structure Data Model • Nodes - Table • Edges - Relationships • Properties – Column Every node knows its adjacent nodes No separate index lookup or complex joins present White board friendly.
  8. 8. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Why Graph DB ? Fast and easy to query Very high scalability - up to 32 billion nodes Fast deep traversals instead of slow SQL queries that span many table joins. Support ACID transactions with rollbacks support Performance never degrade with increase in data unlike RDBMS Priceless for connected data - That’s why industry leaders like FB, Google, eBay etc has already gone its way.
  9. 9. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Let’s compare
  10. 10. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Let’s compare
  11. 11. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Let’s compare
  12. 12. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Neo4j World’s leading and most popular graph database Open source , implemented in java Schema free property graph Perfect for complex and highly connected data Here both nodes and relationships can contain properties REST API - Accessible from most of the programming languages like Java, C#, Python, Pearl, Scala, Cypher etc.
  13. 13. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Cypher Query Language Pattern matching query Language (like SQL for graphs) It follows SQL like syntax and supports many clauses like Where , Order By etc. It basically describes what you want and not how you want. Avoid using Ids.
  14. 14. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Cypher Example
  15. 15. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Let’s compare head to head
  16. 16. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. Eassyyyy isn’t it ??? Let’s compare head to head Compare Recommendation Engine. Problem: Recommendation engine should look at the products that peer customers have purchased and then suggest them to the current user.
  17. 17. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. RDBMS GRAPH
  18. 18. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. RDBMS GRAPH
  19. 19. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. RDBMS GRAPH
  20. 20. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. RDBMS GRAPH
  21. 21. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc. RDBMS GRAPH
  22. 22. US | UK | BENELUX | ME | IND©1996-2015 Aspire Systems, Inc.
  23. 23. Fraud Detection Case Study
  24. 24. Fraud Detection - Result
  25. 25. Key questions … Cost Efficient ? Scalable ? Performance ? Normalized ? User friendly ? Simple queries, No joins, Multiple Language support, Nice UI
  26. 26. EMBRACE IT REALITY IS A GRAPH Conclusion
  27. 27. This is just the beginning... Visit www.neo4j.org for more! Get Graphy!
  28. 28. References: https://en.wikipedia.org/wiki/Graph_database http://www.tutorialspoint.com/neo4j http://www.neo4j.org http://www.neo4j.org/learn/cypher

×