19. class Client < ActiveRecord::Base
has_one :address
has_many :orders
has_and_belongs_to_many :roles
end
20. DesVentajas de BD Relacionales
Fricción!
Interoperabilidad
Adaptación al cambio
Escalabilidad
No está destinada para ciertos escenarios
Interoperability
24. Depth MySQL time (s) Neo4j time (s) Results
2 0.016 0.01 ~2500
3 30.267 0.168 ~110,000
4 1543.505 1.359 ~600,000
5 No Acaba 2.132 ~800,000
MySQL vs Neo4j
* Neo4J in Action
48. MATCH p = (startNode:Station {name: ‘Sol’})
-[rels:CONNECTED_TO*]->
(endNode:Station {name: ‘Retiro’})
RETURN p AS shortestPath,
reduce(weight=0, r in rels: weight + r.weight) as tWeight
ORDER BY tWeight ASC
LIMIT 1
68. Instead of just picking a relational database
because everyone does, we need to
understand the nature of the data we’re
storing and how we want to manipulate it.
Martin Fowler