Beginnerpresentation 120429104540 Phpapp01[1]
Beginnerpresentation 120429104540 Phpapp01[1]
Databases
About Me
Built the Neography Gem (Ruby
Wrapper to the Neo4j REST API)
Playing with Neo4j since 10/2009
• My Blog: http://maxdemarzi.com
• Find me on Twitter: @maxdemarzi
• Email me: [email protected]
• GitHub: http://github.com/maxdemarzi
Agenda
• Trends in Data
• NOSQL
• What is a Graph?
• What is a Graph Database?
• What is Neo4j?
Trends in Data
Data is getting bigger:
“Every 2 days we
create as much
information as we did
up to 2003”
Document
Databases
BigTable
Clones
Key-Value
Relational Store
Databases
90% of
Use Cases
Size
What is a Graph?
What is a Graph?
• An abstract representation of a set of objects
where some pairs are connected by links.
• Pseudo Graph
• Multi Graph
• Hyper Graph
More Kinds of Graphs
• Weighted Graph
• Labeled Graph
• Property Graph
What is a Graph Database?
• A database with an explicit graph structure
• Each node knows its adjacent nodes
• As the number of nodes increases, the cost of
a local step (or hop) remains the same
• Plus an Index for lookups
Compared to Relational Databases
Optimized for aggregation Optimized for connections
Compared to Key Value Stores
Optimized for simple look-ups Optimized for traversing connected data
Compared to Key Value Stores
Optimized for “trees” of data Optimized for seeing the forest and the
trees, and the branches, and the trunks
What is Neo4j?
What is Neo4j?
• A Graph Database + Lucene Index
• Property Graph
• Full ACID (atomicity, consistency, isolation,
durability)
• High Availability (with Enterprise Edition)
• 32 Billion Nodes, 32 Billion Relationships,
64 Billion Properties
• Embedded Server
• REST API
Good For
• Highly connected data (social networks)
• Recommendations (e-commerce)
• Path Finding (how do I know you?)