neo4j - graph database

Click here to load reader

Post on 06-Aug-2015

45 views

Category:

Engineering

4 download

Embed Size (px)

TRANSCRIPT

  1. 1. Neo4j - NoSQL Graph Database Mubashar Iqbal | SSE Confiz Limited
  2. 2. Session Agenda What is Graph Database ? What is Neo4j ? Cypher Graph DB Model
  3. 3. Graph Database A graph database is not about charts, diagrams or vector artwork, it is related with storing data that is structured as a graph. remember linked lists, trees?
  4. 4. What is Graph Database? NoSQL Database Collection of nodes, edges and properties to represent and store data. Provides index-free adjacency Properties expressed as key/value pairs High Performance Complex Relationships
  5. 5. What is Neo4j? Open Source NoSQL Graph Database ACID transaction compliance Runtime Failover Cluster support Compact storage Memory caching for graph Active Community
  6. 6. Cypher - Query Language Cypher is Neo4js graph query language. Match patterns of nodes and relationships in the graph Example: MATCH (actor:Person)-[:ACTED_IN]->(movie:Movie) WHERE movie.title =~ "T.*" RETURN movie.title as title, collect(actor.name) as cast ORDER BY title ASC LIMIT 10;
  7. 7. From SQL To Cypher SQL Cypher SELECT p.* FROM products as p; MATCH (p:Product) RETURN p; SELECT p.ProductName, p.UnitPrice FROM products as p ORDER BY p.UnitPrice DESC LIMIT 10; MATCH (p:Product) RETURN p.productName, p.unitPrice ORDER BY p.unitPrice DESC LIMIT 10; SELECT p.ProductName, p.UnitPrice FROM products as p WHERE p.ProductName IN ('Chocolate',Coffee); MATCH (p:Product) WHERE p.productName IN ['Chocolate',Coffee] RETURN p.productName, p.unitPrice;
  8. 8. Graph DB Model Nodes Labels Relationships
  9. 9. Questions?
  10. 10. Important Links References http://neo4j.com/developer/get-started/ http://www.slideshare.net/neo4j/data-modeling-with-neo4j Video Tutorials https://www.youtube.com/watch?v=7Fsfa5DP9sE https://www.youtube.com/watch?v=bqvDSioHYq8 Neo4j for php http://neo4j.com/developer/php/

View more