NHibernate embedded managed C# database

I was looking for an embedded cross-platform managed database to use for a C# .NET 2.0 project of mine and I was surprised to find out how difficult it was to find one. After you read this post, I hope that you will have discovered a new and exciting choice.

In my search I encountered the following posts:

(sources: Embedded database for .NET SO question, C#/.NET single user database SO question, Good "mobile" database .NET database SO question, Observations on embedded databases by Ayende, as well as many others)

The major options available seemed not good enough for various reasons:

SQLite: It's basically a native library with a x86-only requirement.
SQL Server CE: It's not thread safe and hangs periodically.
VistaDB: Commercial database.
SharpHSQL: No NHibernate support as of yet.
Firebird: Windows only.

The list goes on. Basically all available options either lacked a NHibernate support, or were not cross platform, or required installation, etc.

So when I stumbled upon this little gem called C#Sqlite (csharp-sqlite) which is a C# re-implementation of the latest SQLite database, I thought that my search was over. Alas, this embedded, managed, cross-platform (.NET/Mono) database (which also has an OK performance) was not possible to use with NHibernate, due to the lack of a driver.

I have posted an NHibernate driver for CsharpSqlite [NH-2120], so there, now you can use NHibernate with this wonderfully compact database which fits the bill for all of the above requirements.

I hope you enjoy it!

1 comment:

  1. Nicholas

    Here is a database compatible with .NET, Silverlight, Windows Phone, Mono, Monodroid, and Monotouch: