开发者

Magical Object Database needed with .Net bindings

Lets assume im writing a program, my program has its own entities and such. And since I'm using an OOP .Net language (C#, but could be F# or Iron Python), my objects have weird OOP traits like inheritance, references to other objects, and hierarchical relationships.

Naturally i want to save these all to my God damn database, and obviously i can't because its relational, and came form God damn mathematicians who spent too much time learning about the Set Theory, God damn them.

Now i can use an ORM layer but that would be a little bit of a nightmare, because ill have to write all sorts of XMLs and such.

No. What i want is a database with object oriented capabilities! perhaps even an Object-Relational Database!

But! i also want it to have a natural API and bindings in my .Net开发者_开发技巧 world.

I want to be able to write a class Cat, and to be able to tell me database to save my Cat, and I would. if it would have a Linq provider it would be very useful too.

Any ideas?


Well there are a quite a few object-databases out with different flavors. Some are easy to uses optimized for embedded use cases, like db4o, perst.net etc. Or bigger databases like Versant Object Database, Objectiviy Database etc. Google it for more such databases.

Anyway, such object database let you store object and try to preserve the semantics. So they can store arrays, references, inheritance etc. This allows a very native way to deal with data. Most of the also provide a LINQ provider.

I also recommend to look at document database, like RavenDB or MongoDB. (Also google for more alternatives). Those also have a very natural interface and you can store very complex object-graphs in it. However they are 'document'-oriented. This means that store and update documents, which means in practice that you store and object a bunch of objects together and update those updates together.


Raven DB I think is what you are looking for. There are other document nosql databases around. CouchDB, MongoDB also but these are not native .NET implementations.

B.T.W ORM layers are not a nightmare any more. Far from it, have you looking into L2S, EF and Fluent NHibernate? None of these require XML configuration. Each has its plus and minus points but all are perfectly usable.


For such a scenario you could consider a document database such as Raven: http://ravendb.net/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜