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.

A nova geração de persistência de dados com grafos - Otávio Santana

53 views

Published on

Otávio Santana - Software Engineer, Tomitribe

A tecnologia NoSQL tem se popularizado nas mais diversas áreas e com diferentes usos, o que inclui casos de sucesso com bancos de grafos.
Os bancos de dados de grafos possuem uma estrutura bastante diferente da base de dados relacional e o seu uso ficou bastante forte, sobretudo com sistema de recomendação.
Com esse grande poder e funcionalidade, atualmente, existem cerca de sessenta tipos de bancos de dados do tipo grafos e com essa diversidade surge um problema: para cada banco é necessário aprender uma nova linguagem.
Essa palestra terá como objetivo cobrir um pouco mais sobre esse tipo de banco além de iniciar a pergunta: Já está na hora de falarmos de padrões para os bancos de dados NoSQL?

Apresentado no InterCon 2018 - https://eventos.imasters.com.br/intercon

Published in: Software
  • Be the first to comment

  • Be the first to like this

A nova geração de persistência de dados com grafos - Otávio Santana

  1. 1. Otávio Santana @otaviojava The new generation of data persistence with Graph
  2. 2. Evolution
  3. 3. Goods ● Land ● Gold ● Oil ● Information
  4. 4. Machines
  5. 5. The information is not enough
  6. 6. Big Data
  7. 7. Web 3.0 Web Semantic
  8. 8. Next?
  9. 9. Recommendation
  10. 10. JCP
  11. 11. Ajax
  12. 12. Search
  13. 13. Stark Rogers Romanoff Banners Berlin São Paulo Moscow San Francisco Medellin Travel
  14. 14. Stark Rogers Romanoff Banners New York São Paulo Moscow San Francisco Medellin Travel Business Fun
  15. 15. Reasons why travel 1. Fun 2. Conferences 3. Music 4. Geek Conf 5. Family 6. History 7. Language 8. Honeymoon 9. Work 10. Meetings 11. University 12. Shopping 13. Relax
  16. 16. More Information name Tony Stark nationality American hero Iron man power rich when 2011 why Save the world who flying type Fun name San Francisco country USA State California Founded 1776 Travels
  17. 17. NoSQL ● Database ● Doesn't use structure ● Not Transaction ● BASE ● Five different types
  18. 18. SQL Key-value Column Document Graph Table Bucket Column Family Collection Row Key/value pair Column Document Vertex Column Key/value pair Key/value pair Vertex and Edge property Relationship Link Edge SQL vs NoSQL
  19. 19. Scalability vs Complexity S c a l a b i l i t y Complexity key-value Column Document Graph
  20. 20. CAP
  21. 21. Graph ● Neo4j ● InfoGrid ● Sones ● HyperGraphDB Apollo Ares Kratoswas killed by was killed by Is brother killed killed
  22. 22. Graph Grace Hopper label Person id ada name Ada Lovelace occupation scientist Ada Lovelace label Person id grace name Grace Hopper occupation scientist Knows Vertex Vertex Edge
  23. 23. Graph Radioactive label Person id marie_curie name Marie Curie occupation scientist Marie Curie label nature id radioactive name Radioactive discovers when 1867 where Europe
  24. 24. Graph Database
  25. 25. TinkerPop
  26. 26. TinkerPop Grace Hopper label Person id grace name Grace Hopper occupation scientist Vertex grace = graph.addVertex( T.label, "person", "id", "grace", "name", "Grace Hopper", "occupation", "scientist");
  27. 27. TinkerPop Grace Hopper Ada Lovelace Knows grace.addEdge("knows", ada);
  28. 28. Edges Out -> In <- Both
  29. 29. Marketing Campaign ● Engineer ● Salary 3000 ● Age between 20 and 25 years
  30. 30. SQLId name Occupation Salar y age gender ... ... ... ... ... ... SELECT * FROM Person WHERE occupation = "Engineer" AND salary > 3000 and age BETWEEN 20 AND 25
  31. 31. TinkerPopGrace Hopper Ada Lovelace Knows g.V().has("occupation","Engineer") .has("salary", gt(3000)) .has("age", between(20, 25));
  32. 32. Their Friends
  33. 33. SQLId name Occupation Salar y age gender ... ... ... ... ... ... SELECT * FROM Person WHERE occupation = "Engineer" AND salary > 3000 and age BETWEEN 20 AND 25//...joins Id know ... ...
  34. 34. TinkerPopGrace Hopper Ada Lovelace Knows g.V().has("occupation","Engineer") .has("salary", gt(3000)) .has("age", between(20, 25)) .out("knows");
  35. 35. Falling in love
  36. 36. SQLId name Occupation Salar y age gender ... ... ... ... ... ... SELECT * FROM Person WHERE occupation = "Engineer" AND salary > 3000 and age BETWEEN 20 AND 25//...joins Id know ... ... Id love ... ...
  37. 37. TinkerPopGrace Hopper Ada Lovelace Knows g.V().has("occupation","Engineer") .has("salary", gt(3000)) .has("age", between(20, 25)) .outE("knows") .has("feel", "love") .bothV();
  38. 38. g.V().repeat(out("eats")) .times(3); g.V().repeat(out("eats")) .until(has("name", "grass")); //path().by("name");
  39. 39. Otávio Santana @otaviojava

×