Description Graph databases employ nodes, properties, and edges. Graph databases are based on graph theory, and employ nodes, edges, and properties. Nodes represent entities such as people, businesses, accounts, or any other item to be tracked. In contrast, graph databases directly store the relationships between records. The true value of the graph approach becomes evident when one performs searches that are more than one level deep. Properties add another layer of abstraction to this structure that also improves many common queries. Relational databases are very well suited to flat data layouts, where relationships between data is one or two levels deep. Properties Graph databases are a powerful tool for graph-like queries. History In the pre-history of graph databases, in the mid-1960s Navigational databases such as IBM's IMS supported tree-like structures in its hierarchical model, but the strict tree structure could be circumvented with virtual records.
NoSQL Frankfurt 2010 - The GraphDB Landscape and sonesSocial networks in the database: using a graph databaseRecently Lorenzo Alberton gave a talk on Trees In The Database where he showed the most used approaches to storing trees in a relational database. Now he has moved on to an even more interesting topic with his article Graphs in the database: SQL meets social networks. Right from the beginning of his excellent article Alberton puts this technical challenge in a proper context: Graphs are ubiquitous. Social or P2P networks, thesauri, route planning systems, recommendation systems, collaborative filtering, even the World Wide Web itself is ultimately a graph! Given their importance, it’s surely worth spending some time in studying some algorithms and models to represent and work with them effectively. After a brief explanation of what a graph data structure is, the article goes on to show how graphs can be represented in a table-based database. This post is going to show how the same things can be done when using a native graph database, namely Neo4j. Representing a graph Transitive closure