English 中文(简体)
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...

最佳回答

I just developed a first version of a REST client for OrientDB. http://netorientdb.codeplex.com

问题回答

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();
}

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.

Regarding your second question on RavenDB, it doesn t have "joins" like in the relational sense but you can always store references to other documents by storing it s document id field. Here is the join question in the FAQ. One of the suggestions they give is to denormalize (store more than just the Id of the related document) which can be a big trade-off to make.

I just recently came across this repository. I haven t looked at the code or used it yet, but it has .NET interfaces for:

  1. BluePrints

  2. Rexster

  3. Pipes

    These utilities can be used to connect with multiple Graph Databases (those that allow BluePrints) including neo4j and OrientDB. For more information also look at TikerPop.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签