Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for guidance on embedded .NET database (such as db4o, NHibernate, or RavenDB)

I have an object model that I want to store using an embedded database. I have so far been looking at db4o, NHibernate to SQLCE (w/ linq), and RavenDB. This would be used in a desktop C# application.

The key features I am looking to leverage are: Linq or similar for queries (no SQL or HQL), Embedded data engine, pocos, poco first model, no install (no registry or similar)

Can any one suggest one? Are the three I am looking at the best choices? Are there other options? Of the three, can anyone recommend one over the other?

Thanks

like image 390
David B Avatar asked Aug 27 '10 00:08

David B


2 Answers

Well the three suggested databases are very different in their nature. SQLCE with Hibernate as RDBMS with a ORM, db4o as object database and RavenDB as document database. Each of them has its strengths.

SQL CE & NHibernate-Combo The good:

  • Extremely good support in tooling, the knowledge and a big community is there
  • Easy to upgrage to MS SQL servers
  • Extrem good reporting support
  • The power of SQL

The bad:

  • Needs mapping
  • The mapping between the OO and relational world is not easy and can lead to issues with complex models.

RavenDB

The good:

  • Doesn't need any mapping
  • Easy to use
  • Powerful indexing
  • JSON & HTTP access

The bad:

  • If your domain doesn't fit to a document-oriented approach, it will be quite painful
  • It does not support the .NET Framework Client Profile (which is of particular importance as the OP's question is concerning embedded databases)

db4o

The good:

  • Doesn't need any mapping
  • Easy to use
  • The storage model is close the object-model. This also works for very complex models.
  • -

The bad:

  • Tooling support is weak.

Afaik all three support LINQ and POCO-first approach. However since NHibernate & SQL CE still need tons of mapping its not as friction free as it could be.

I think if your focus is on POCO first, LINQ-support, ebedded usage and easy to use, I would try RaveDB or db4o. If your focus is on 'safety', community-knowledge, tool-support and reporting I would go with NHibernate and SQL CE.

like image 106
Gamlor Avatar answered Oct 27 '22 13:10

Gamlor


Firebird is a terrific embedded database which has long supported all the modern features of an enterprise database:

  • ANSI SQL
  • ACID
  • Stored procedures
  • Triggers

You can get the .NET provider (last updated May 24th according to the site) and it supports Entity Framework and Linq.

like image 20
John Hurrell Avatar answered Oct 27 '22 12:10

John Hurrell