Hidden Windows Gems: Extensible Storage Engine

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:

https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/branches/rhino-divandb

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.

Print | posted on Tuesday, December 23, 2008 12:53 PM

Feedback


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 2:36 PM Mark

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


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 4:29 PM 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?


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:07 PM configurator

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


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:23 PM Ayende Rahien

Mark,
This is not a relational DB, NH assumes RDBMS.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:40 PM Ayende Rahien

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


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:50 PM Ayende Rahien

Not really, this is a non relational store.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:55 PM 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.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 5:58 PM Ayende Rahien

Chris,
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.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 6:26 PM configurator

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?


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 6:29 PM LukeB

Sounds like an embedded MultiValue database, like D3 or OpenQM


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 6:55 PM Roger Jennings

Thanks for the heads up.

What we need now is LINQ to Esent. See oakleafblog.blogspot.com/.../...linq-to-esent.html.

--rj


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 7:24 PM 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.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/23/2008 8:51 PM 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.


Gravatar

# re: Hidden Windows Gems: Extensible Storage Engine 12/24/2008 12:14 AM James Newton-King

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


Gravatar

# almost there 12/30/2008 6:45 PM Seth

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

Comments have been closed on this topic.