Fog Creek Software
Discussion Board

Embedded database engines for .NET

I am developing app using dot net which needs a local database.  I have found a number of vendors but I have not found any objective review of the products.  Does any one have any experience they can share on the topic?  My requirements are: easy instillation, and reliable data storage (A corrupted file would be a very bad thing).  Speed is not important to this project. 

Again, I am looking for people to share their expirance with embedded database in standalone desktop apps. 


Tuesday, April 8, 2003

Probably want to use Jet or MSDE.

Tuesday, April 8, 2003

+1 for Jet (Access). Perfect for lightweight use, as the SQL is pretty standard, backup is easy, and no additional install required above and beyond the already-needed MDAC (for ADO.NET).

Brad (
Tuesday, April 8, 2003

And, as a helpful tip, its easy enough to embed a blank .mdb as a resource in .NET (the assembly comes to a smidge over 100k) - which means you can do the whole thing via OLE DB and without needing a legacy reference.

Of course if someone can tell me how to create a new .mdb without ADOX...

Tuesday, April 8, 2003

FileCopy Blank.mdb MyNewOne.mdb

Geoff Bennett
Tuesday, April 8, 2003

That's one option - but not, in my opinion, a particularly good one (although my method is a glorified version of the same thing, its a tad tidier and you don't have to worry about blank.mdb still being where you expect it to be).

Wednesday, April 9, 2003

The Open Source options include SQLite [ ] and MetaKit [ ] which is not an SQL database, but has an SQL front end called MkSQL [ ].

They have various advantages and disadvantages compared to Jet/MSDE - e.g., Metakit can have a column whose entries are complete tables (with rows, columns and all), Sqlite can use user defined functions in the queries with much less hassle than any other engine,  etc.

Neither is .NET specific, but they are both written in portable C/C++ so should be easy to work with.

And, you get the source.

Wednesday, April 9, 2003

But you were saying that you would include blank.mdb in the resource for the application. In which case, you could persist it to the hard drive and copy it. A much less computationally taxing solution far less prone to errors than recreating the schema in code through ADOX.

Geoff Bennett
Wednesday, April 9, 2003

DanP -- You might want to check out Advantage Local Server, a free fileserver based database.  Advantage has a wide following in the Delphi community, but it also has ODBC and OLEDB providers so you really can use it in any Windows environment.

Advantage gives their fileserver-based "Local Server" version away for free to seed the market for their client/server "Advantage Database Server."  But you'd be able to take advantage of the free Local Server without ever upgrading to the Database Server.

My guess is that it's quite a bit more robust than Jet, and also easy enough to install.  I think it's at least worth you checking it out.

Herbert Sitz
Thursday, April 10, 2003

I have one, generic, piece of code that lets me splat a blank database into my choice of location on the HDD.

I then create the schema using DDL - ok this takes a bit of work to get started, but since you need to be able to change the schema as the application evolves its a necessary skill - and as its in DDL you can see exactly what you've done and reproduce it as many times as you want.

All of the above will done with consistent behaviour that's going to be inherited from a standard class (any decade now...) within a "pattern" learnt from experience.

Saturday, April 12, 2003

*  Recent Topics

*  Fog Creek Home