Full refund within 14 days of purchase date.
Build a social web application? Need a high-performance database with flexible structure? You must consider to use neo4j as your data-store engine!
Neo4j is a NoSql graph-based database, offers flexible schema rather than strict and static tables, high performance and scalability, best for social web applications.
Neo4j can be also deployed into the windows azure cloud (More info)

Neo4j Featues:
**About the library...
**
Neo4j is written in Java, but supplies a fully Rest API for creating, manipulating and deleting objects from the graph. This .net library wraps the Rest methods and allows you to store .net objects- as a somthing between flexible and static.
More information about Neo4j: http://www.neo4j.org
I assumed that you have installed Java Runtime on your machine. If you haven't did it yet, please download JRE.
Go to http://neo4j.org/download and choose the latest version.
Download and extract the contents to a suitable location.
Start the server by opening a command prompt, and running the command:
bin\neo4j start
If things are fine, enter to http://localhost:7474 on your browser. You will redirect to the administrative web application which provides some information of your database and a simple database navigation interface.

The properties that you want to save in the graph must have GraphPropertyAttribute (similar to DataMemberAttribute in WCF).
For example, I created a Person object which represents a node with person's properties:
public class Person : GraphPropertyContainer
{
public Person() : base() { }
[GraphProperty]
public string Firstname { get; set; }
[GraphProperty]
public string Lastname { get; set; }
}
And a KnowsRelation, reperesents a KNOWS relationships between nodes (=people).
[GraphObject("Knows")]
public class KnowsRelation : GraphPropertyContainer
{
public KnowsRelation() : base() { }
[GraphProperty]
public DateTime CreationTime { get; set; }
}
var graph = new GraphContext("http://localhost:7474/db/data/");
You can also store the database Url in the
Person p1 = new Person()
{
Firstname = "Steve",
Lastname = "Jobs"
};
Person p2 = new Person()
{
Firstname = "Steve",
Lastname = "Ballmer"
};
//Creating graph nodes
var p1Node = graph.CreateNode(p1);
var p2Node = graph.CreateNode(p2);
//Connect the nodes with graph "KNOWS" relationship
graph.GetReferenceNode().CreateRelationshipTo(p1Node, new KnowsRelation() { CreationTime = DateTime.Now });
graph.GetReferenceNode().CreateRelationshipTo(p2Node, new KnowsRelation() { CreationTime = DateTime.Now });
I also connected Steve & Steve with "KNOWS" relation:
p1Node.CreateRelationshipTo(p2Node, new KnowsRelation() { CreationTime = DateTime.Now });
// Get the "Steve Jobs" object and change it to "Eric Shmidt"
var node = graph.GetReferenceNode().TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, x => x.Firstname == "Steve" && x.Lastname == "Jobs", typeof(KnowsRelation), Neo4Net.Core.Direction.Outgoing).FirstOrDefault();
if (node != null)
{
var properties = node.GetProperties();
properties.Firstname = "Eric";
properties.Lastname = "Shmidt";
node.CommitChanges(properties);
}
Graph databases is great for social applications, not only because it can handles billions of data, but it offers a simple and flexible structure based on **relationships between objects, **similar to the real world.
If I'd like to know who are the people that Eric Shmidt knows, I just need to get the objects that connect to Eric with "KNOWS" relation!
// Get all the people that Eric Shmidt knows
var peopleThatEricKnows = p1Node.TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, Neo4Net.Core.ReturnableEvaluator.AllButStartNode, typeof(KnowsRelation), Neo4Net.Core.Direction.Outgoing);
I can also get the opposite case, when I'd like to know who are the people that knows Eric.
Just change the direction from Outgoing to Incoming:
var peopleThatKnowsEric = p1Node.TraverseNodes(Neo4Net.Core.TraversalOrder.DepthFirst, 1, Neo4Net.Core.ReturnableEvaluator.AllButStartNode, typeof(KnowsRelation), Neo4Net.Core.Direction.Incoming);
Good. It was just what i was looking for, except for the documentation.
Questions & Comments