Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to work with OrientDB using C#?

Are there any implementations, api or examples of OrientDB and C#. The reason I am looking at OrientDB is becuase it's the only one that I found that is a combination of Graph and Document.

Any suggestions on how I should try this.

My next choice is RavenDB, but I am not sure if it supports joins or linked documents?

Any thoughts...

like image 391
Pranav Shah Avatar asked Mar 24 '11 14:03

Pranav Shah


People also ask

What is OrientDB and how to learn it?

This tutorial is designed for software professionals who are willing to learn NoSQL Database in simple and easy steps. This tutorial will give a great understanding on OrientDB concepts. OrientDB is NoSQL Database technologies which deals with the Documents, Graphs and traditional database components, like Schema and relation.

Is the OrientDB-net driver included in my installation?

The OrientDB .NET SDK is currently being rewritten as a modular SDK. If you would like to check it out and help drive the direction of the new version, navigate to OrientDB.NET.Core. The OrientDB-NET driver is not included by default in your OrientDB installation. In order to use it, you must install it separately on your system.

How do I use OrientDB-NET functions and classes?

In order to utilize OrientDB-NET functions and classes, set the relevant namespace with the using directive. Server Documents the OServer interface, used when operating on the OrientDB Server to manage server-level configuration as well as creating, removing and listing databases on the server.

How to compile OrientDB from source code?

This process requires that you install Git and Apache Maven on your system. To compile OrientDB from source code, clone the Community Edition repository, then run Maven ( mvn ) in the newly created directory: The develop branch contains code for the next version of OrientDB.


2 Answers

OrientDB has an official binary driver for .NET look here http://orientdb.com/docs/3.0.x/

Example of usage OrientDB-NET.binary

string release = OClient.CreateDatabasePool("127.0.0.1", 2424, "ModelTestDB", ODatabaseType.Graph, "admin", "admin", 10, "ModelTestDBAlias");
using(ODatabase database = new ODatabase("ModelTestDBAlias"))
{
    // prerequisites
    database
      .Create.Class("TestClass")
      .Extends<OVertex>()
      .Run();

    OVertex createdVertex = database
      .Create.Vertex("TestClass")
      .Set("foo", "foo string value")
      .Set("bar", 12345)
      .Run();
}
like image 197
Roman Gordon Avatar answered Sep 18 '22 18:09

Roman Gordon


Currently OrientDB supports both a REST/JSON protocol and a native binary protocol. There are Python and Javascript wrappers for the REST protocol whyle there are C and PHP wrappers for the native protocol. I don't know if a C# wrapper is in the working however looking at the specifications ( http://code.google.com/p/orient/wiki/OrientDB_REST ) writing one for C# should be straightforward. I have met in person the architect of the project at a JUG meeting and I must say that OrientDB is a very promising project. Also Luca Garulli ( the architect ) is a very available person, so you may write him if you need more information.

like image 31
register Avatar answered Sep 18 '22 18:09

register