We need an Embedded Database for .NET applications

No, I'm not talking about Jet / Access. Microsoft and the general development community are moving away from it; plus, the MDAC redistributable is kinda big.

No, I'm not talking about MSDE or SQL Server Express (even though the MDF file connections are cool). Both require huge installs. Worse, they're really installing a database server on the end user's computer. That's not appropriate for a small, freeware utility - if I started intalling a freeware app and it wanted to install a 40MB database server that would run on startup, I'd cancel the intall.

I've been working with SQLite to moderate success. I'm evalutating SharpHSQL now. WATYF and Rick Strahl list some of the options out there along with their problems - none of them are really there. They shouldn't be necessary anyhow - a solid development framework like .NET should include a basic, embedable DB. Heck, it has support for IrDA End Points, how about a lightweight database?

And - No, no, no, a thousand times no: XML is definitely not what I'm talking about. .NET pushes it, but it's a terrible data storage format.

27 Comments

  • I'll second Firebird as an embedded DB or even as a regular replacement DB.



    SQLite is very nice though I do admit.

  • Have you looked at running SqlCE on your Windows platform? I believe it works on CE devices as well as tablet pcs. I have been told it runs on all windows platforms, but it only is licensed on the CE and tablet pcs.



    Wally

  • SQLIMDB from Quilogic is pretty good but purely IMDB. Check www.quilogic.cc

  • Well the hits just keep on coming...



    I tried Minosse.... couldn't even get it to create a database... using their own sample code... *ack*



    And to top it all off, I just found out that firebird's embedded version can't be run on a network drive (which my app is sometimes run from)... so there goes my fall-back option.





    *sigh*





    Doesn't anyone make a database that doesn't have some kind of critical flaw?







    WATYF



  • It is a file operation. Fast and stable, I used it on my system(C & Java). It is simple ,not depends on other DLL. Open the file and you can INSERT, UPDATE, DELETE a (key,value) pair.

    It is really small. not more than 100K.

    If you want to try, you can give a email to me : forest_luo@21cn.com

  • db4o <a target="_new" href="http://www.db4o.com">http://www.db4o.com does not force you to store blobs in external files, this is only an option, to allow you to keep your main database file smaller, if you like to do that. You can also store byte arrays in the main file, just like any other object.



    Using binary serialization to store objects, as you are planning to do, is not a good idea. Your system will break if you modify classes. db4o takes care of this problem for you by updating it's internal schema automatically, whenever you modify your classes, you do not even have to run any reorganisation on existing database files.

    --

    Carl Rosenberger

    Chief Software Architect

    db4objects Inc.

    <a target="_new" href="http://www.db4o.com">http://www.db4o.com

  • Too bad MS Access won't work.
    Using OleDb I can connect to it but it doesn't seem to know SQL very well at all.
    I can execute statements in the MS Access query builder just fine. The same statements through OleDb are crashing.

    How close is Firebird's SQL to MySQL?

  • Please take a look at Perst for .NET. It is an embedded database that is thread-safe and supports multiple processes, and has a simple SQL interface.

  • Has anyone thought about going back to using ini files?

    They were good on Windows 3.1

  • I created a .NET Windows application that required an embedded database. After seeing this blog I decided to try Firebird embedded.
    YES!! It's real light weight, uses standard ANSI SQL (more or less) and so far it's plenty quick enough.
    I found a couple small drawbacks - it's difficult to get unique for a combination of a lot of fields.
    The newer version claims to solve that but I can't find drivers for .NET.
    Overall, I'm real happy with it and have settled on it as the final database for this .NET 2.0 app.

  • Has anyone considered porting Java DB (AKA Apache Derby (AKA Cloudscape)) to C#? I have not found bad anything about it (only good things), and I would imagine porting Java DB to C# would be rather easy. It also has the backing of 3 major parties: IBM, Apache and Novell, so i think it should be stable.

    I did found an article on how to have ADO.NET interface with Java DB (Cloudscape) but the process seemed a little involved. And I would rather have my Applications to be completely .NET


  • MySql Embedded. Full feature. Free and open if your end product is. Optionally OEM license if your product is commercial.

  • difference between *.fdb and *.gdb in firebird

  • Did you try scimoredb?. I too am in a dilemma and am planning to use scimore. I think we have to create a perfect DAL

  • I managed to get the java H2 database running in C# using IKVM.Net.
    It converted the .Jar file into a .Net Dll file and ran perfectly.
    Even .Net triggers and .Net User defined functions worked in the database.
    Since IKVM converts java bytecode into MSIL there should be only a small performance hit, if any.

  • SQL Server compact edition seems to be a good choice ? Only 2Mb footprint and can even be synchronized with a back end using the new Synch libraries and ADO.NET

  • I was wondering what the original postie finally used and how did it go.

  • Has anyone tried Embedded MySQL?

  • I am looking for an embedded database that can store about 5 million rows. Luckily the table that stores the 5 mil rows can be read only.
    I was planning to use two embedded databases. one for the large data set and one for everything else. Has anyone tried any of the databases mentioned here with such a large dataset?

  • www.elevatesoft.com

    'nuff said

  • Depends on whether you need SQL like database or object database.

    I have tried out most of object database in the last a few days, and found Perst to fit my need best.

    Db4o is nice, but their Client/Server mode can not supports read/write from different application.

  • SQL Server Compact Edition!
    - 1.8 meg
    - No install needed (simply copy the DLLs with your app)
    - Full TransactSQL support
    - Single database file
    - Runs in-process with your app (no service)
    - GUI support right in Visual Studio
    - Can sync with a real database server
    - Very very cool and stable!

  • Try Scimore embded database

  • why MySQL don't support embedded database for dot net environement ??
    MySQL was a very good databases !!!
    if someone has found a solution for this, please tell us !!

  • STSdb is a small footprint, embedded object database system designed for mission critical and real-time applications. It provides intuitive use, blazing performance and brand new database techniques.

    - Fully embedded .NET database
    - Blazing performance
    - Transaction support (ACID); instant commit & rollback
    - Unlimited records per table; Unlimited tables per database
    - Vertical data compression; custom compression
    - Scheme hierarchy
    - Snapshots
    - Composite keys; custom keys
    - Based on internal file System
    - ...

  • Hello Everyone,

    I am considering to use MS-Access as a client/server and I would like to know what are the risk involve to using this database in a client/server or 3-tier architecture since this database was created as a personal database?

  • scimore is very good and stable, but their ADO.NET driver cannot be used with Net 4.0 and VS 2010

Comments have been disabled for this content.