Successfully reported this slideshow.
Your SlideShare is downloading. ×

Soirée du Test Logiciel - Test Driven Development with graph databases - S. DARGO, Amadeus

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Soirée du Test Logiciel - Test Driven Development with graph databases - S. DARGO, Amadeus

  1. 1. Test driven development with graph databases @SandorDargo 05/10/2017, Soiree du Test Logiciel ©AmadeusITGroupanditsaffiliatesandsubsidiaries
  2. 2. _Father of one _Developer at Amadeus _Blogger – http://sandordargo.com _Amateur of graph databases 3 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Who am I?
  3. 3. _Not a store of excel charts _Not a data visualization tool 5 ©AmadeusITGroupanditsaffiliatesandsubsidiaries What is not a graph database?
  4. 4. _Type of NoSQL database _Based on the concepts introduced by Leonhard Euler _Collections of nodes and relationships 6 ©AmadeusITGroupanditsaffiliatesandsubsidiaries What is a graph(-oriented) database?
  5. 5. _Graph = Nodes + Relationships _Property Graph = Graph + key-value attributes/properties _Labelled Property Graph = Property Graph + Tags/Labels 7 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Labelled Property Graph Data Model
  6. 6. 8 ©AmadeusITGroupanditsaffiliatesandsubsidiaries A sample graph about wines
  7. 7. _Topologies _Social data _Page ranking _Analyse highly connected data (Panama papers) 9 ©AmadeusITGroupanditsaffiliatesandsubsidiaries When to use a graph (i.e. advantages of a graph)? “If you can whiteboard it, you can graph it”
  8. 8. _Graph database with three different node types • Wine regions (e.g. Provence) • Wine subregions (e.g. Bandol) • Grapes (e.g. Mourvedre) _Develop services to retrieve the nodes by name and the related nodes _Use Java or Python (Java 8 tonight) _Start code for Java at: https://github.com/sandordargo/neo-wine- services/tree/starting-code 10 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Code Kata
  9. 9. 11 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Creating test data with Cypher CREATE (eger:WineRegion {name:'Eger'})-[:CONTAINS] ->(eger_subregion:WineSubRegion {name:'Eger'}), (eger)-[:CONTAINS]->(matra:WineSubRegion {name:'Mátra'}), (eger)-[:CONTAINS]->(bukk:WineSubRegion {name:'Bükk'}), (eger_subregion)<-[:GROWS_AT]-(merlot:Grape {name:'Merlot'}), (eger_subregion)<-[:GROWS_AT]-(pinot_noir:Grape {name:'Pinot Noir'}), (eger_subregion)<-[:GROWS_AT]-(cabernet_franc:Grape {name:'Cabernet Franc'})
  10. 10. 12 ©AmadeusITGroupanditsaffiliatesandsubsidiaries Simple query with Cypher MATCH (eger:WineRegion {name:'Eger'})- [relationship:CONTAINS] -> (subregion:WineSubRegion) RETURN eger, relationship, subregion
  11. 11. _Ideal when a relationship is OPTIONAL _Will use null for missing part of a pattern _Example: 13 ©AmadeusITGroupanditsaffiliatesandsubsidiaries OPTIONAL MATCH MATCH (wr:WineRegion)-[:CONTAINS]→ (wsr:WineSubRegion {name:{subregionName}}) OPTIONAL MATCH (wsr)<-[:GROWS_AT]-(grape:Grape) RETURN wr, wsr, grape
  12. 12. Thank you! ©AmadeusITGroupanditsaffiliatesandsubsidiaries You can follow us on: AmadeusITgroup amadeus.com Amadeus.com/blog

×