Neo4j is the leading open source graph database project. Graph databases are a type of NoSQL database, and they excel in storing information about relationships between entities. The graph databases will store nodes (entities), which can also have properties. Edges (relationships) connect nodes, and can also have properties to describe the type of relationship.

Neo4j can run on Windows, the free Community edition is available at Download Neo4j (You need the Java JRE installed as well before running).
Extract the downloaded ZIP, and run the bin/Neo4j.bat file to start the database service.

The service runs on port 7474 by default. Navigating to http:\\localhost:7474/webadmin/ will open the Web Admin tool, which includes a data browser and a query console. The console can query the database using the Cypher query language.

For my experimentation, I downloaded a C# client, Neo4jClient using NuGet.

An online Neo4j Manual is available, it can also be downloaded as a PDF, which requires filling out a short form with contact information the site.

There is also a Free Graph Databases e-book from O’Reilly available to download. It also requires some contact information as well.

Here is a short program to create nodes and edges, before dropping them.

using System;

using Neo4jClient;

// for code samples and more info on Neo4jClient
namespace Neo4jDemo
    public class Program
        // Define our entity
        public class FootballEntity
            public string FirstName { get; set; }
            public string LastName { get; set; }
            public string Position { get; set; }

        // Define relationships
        public class Coaches : Relationship,
            public Coaches(NodeReference targetNode) : base(targetNode){}

            public const string TypeKey = "Coaches";

            public override string RelationshipTypeKey
                get { return TypeKey; }

        public class Teammates : Relationship,
            public Teammates(NodeReference targetNode) : base(targetNode){}

            public const string TypeKey = "Plays with";

            public override string RelationshipTypeKey
                get { return TypeKey; }

        static void Main(string[] args)
            // Connect
            var client = new GraphClient(new Uri("http://localhost:7474/db/data"));

            // Add nodes
            var coachReference = client.Create(new FootballEntity { FirstName = "Mike", LastName = "Smith", Position = "Head Coach" });
            var coachId = coachReference.Id;

            var qbReference = client.Create(new FootballEntity { FirstName = "Matt", LastName = "Ryan", Position = "QB" });
            var qbId = qbReference.Id;

            var wrReference = client.Create(new FootballEntity { FirstName = "Roddy", LastName = "White", Position = "WR" });
            var wrId = wrReference.Id;

            var rbReference = client.Create(new FootballEntity { FirstName = "Steven", LastName = "Jackson", Position = "RB" });
            var rbId = rbReference.Id;

            // Display Node IDs
            Console.WriteLine("Coach ID = " + coachId.ToString());
            Console.WriteLine("QB ID = " + qbId.ToString());
            Console.WriteLine("WR ID = " + wrId.ToString());
            Console.WriteLine("RB ID = " + rbId.ToString());

            // Retrieve a node
            var retrievedNode = client.Get(coachReference);

            // Create relationships
            var relationship = client.CreateRelationship(coachReference, new Coaches(qbReference));
            relationship = client.CreateRelationship(coachReference, new Coaches(wrReference));
            relationship = client.CreateRelationship(coachReference, new Coaches(rbReference));
            relationship = client.CreateRelationship(qbReference, new Teammates(wrReference));
            relationship = client.CreateRelationship(qbReference, new Teammates(rbReference));
            relationship = client.CreateRelationship(rbReference, new Teammates(wrReference));

            // Pause to examine values

            // Cleanup
            client.Delete(coachReference, DeleteMode.NodeAndRelationships);
            client.Delete(qbReference, DeleteMode.NodeAndRelationships);
            client.Delete(wrReference, DeleteMode.NodeAndRelationships);
            client.Delete(rbReference, DeleteMode.NodeAndRelationships);

            // End