Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,128 | Comments: 45,550

filter by tags archive

Hidden Windows Gems: Extensible Storage Engine

time to read 2 min | 234 words

Did you know that Windows came with an embedded database?

Did you know that this embedded database is the power behind Active Directory & Exchange?

Did you know that this is actually part of Windows' API and is exposed to developers?

Did you know that it requires no installation and has zero administration overhead?

Did you know there is a .Net API?

Well, the answer for all of that is that you probably didn't know that, but it is true!

The embedded database is called Esent, and the managed library for this API was just released.

This is an implementation of ISAM DB, and I have been playing around with it for the last few days. It isn't as nice for .Net developers as I would like it to be (but Laurion is working on that).

I think making this public is a great thing, and the options that this opens up are quite interesting. I took that for a spin and came up with this tiny bit of code that allow me to store JSON documents:


It is not done, not nearly done, but the fact that I could rely on the embedded DB to do so made my life so much easier. I wish I knew about that when I played with Rhino Queues, it would have made my life so much simpler.



I'm curious ... what do you think how complex is the task to create a ESENT backend for NHibernate? Is it even possible?

Justin Chase

How is this not just a relational registry? Is there some sort of isolation mechanism to separate processes from accessing each other's data?


Wow, that's interesting. Can this be used as a normal relational database?

Ayende Rahien


This is not a relational DB, NH assumes RDBMS.

Ayende Rahien

It is not registry, it is stored in a file, which you control

Ayende Rahien

Not really, this is a non relational store.

Chris Patterson

Wow, the second I saw the word Jet I remembered this beast.

I wonder if it is still using the same original MS Access engine it was using before.

I'm curious to see how far you take it, but I remember many long nights trying to repair corrupt jet databases several years ago.

Ayende Rahien


No, it is not the same API nor is it the same engine.

Different implementation that happen to share the same prefix, I am afraid.


If the database can contain tables, what's stopping you from using it as a not-really-that-good database? Even Excel can be used as a relational database, can't it?


Sounds like an embedded MultiValue database, like D3 or OpenQM

Ayende Rahien

Not really. It doesn't have SQL.

And it doesn't have joins.

It is literally structured storage. You get indexes, and the over experience is very similar to the one you get from BDB.

Scott White

Interesting, I would be more prone to use Sqlite since it's relational and deals with the same programming constructs that I am familiar with.

James Newton-King

Cool, Json.NET. Let me know how you get on with it


If only someone would combine ESE with Firefox sqlite, shake and not crash

Comment preview

Comments have been closed on this topic.


  1. The worker pattern - 18 hours from now

There are posts all the way to May 30, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats