Tech Off Thread

13 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Any C# non-relational DBMS?

Back to Forum: Tech Off
  • User profile image
    Bass

    Something like Dictionary but without having to manually manage persistance.

  • User profile image
    W3bbo

    Why not give an ODBMS a try? Your dictionary suggestion just reminds me too much of memcached.

  • User profile image
    Bass

    W3bbo said:

    Why not give an ODBMS a try? Your dictionary suggestion just reminds me too much of memcached.

    Any suggestions? I would like something embeddable into my project, so written in .NET (and under a liberal license). Smiley Any kind of relational functionality is not needed, just basically the same acessor methods of Dictionary but with intelligent persistance.

  • User profile image
    figuerres

    Bass said:
    W3bbo said:
    *snip*

    Any suggestions? I would like something embeddable into my project, so written in .NET (and under a liberal license). Smiley Any kind of relational functionality is not needed, just basically the same acessor methods of Dictionary but with intelligent persistance.

    well I wonder if anyone has done a version of DBF files in .net?

    they would be fairly simple and clean to work with and if there is a good DBF library it would include indexing for lookup.

    i have done a dbf reader before but not indexing or random access it was not hard....

    i don't know if that would be to simple for what you want ?

    but DBF record access  methods would not be hard to write and could be a small dll.

     

  • User profile image
    DCMonkey

    Bass said:
    W3bbo said:
    *snip*

    Any suggestions? I would like something embeddable into my project, so written in .NET (and under a liberal license). Smiley Any kind of relational functionality is not needed, just basically the same acessor methods of Dictionary but with intelligent persistance.

    There's BerkeleyDB, which is a fast Key-Value database engine. It has an unofficial .Net wrapper. BDB has an open source version but you'd have to distribute your source too if your program doesn't stay internal (or pay the reportedly high license fee for the commerical version).

    Or there's MS's own Extensible Storage Engine, the one underlying Active Directory and Exchange. There doesn't seem to be a .Net wrapper, but there is a toolkit (http://www.iiobo.com/ExtensibleStorageEngine.aspx) that offers examples of c++/C# integration.

    Or you could try sqlite with one table.

     

  • User profile image
    Ion Todirel

    Bass said:
    W3bbo said:
    *snip*

    Any suggestions? I would like something embeddable into my project, so written in .NET (and under a liberal license). Smiley Any kind of relational functionality is not needed, just basically the same acessor methods of Dictionary but with intelligent persistance.

    > under a liberal license

    "liberal" - LOL, that was funny Smiley

  • User profile image
    TommyCarlier

    DCMonkey said:
    Bass said:
    *snip*

    There's BerkeleyDB, which is a fast Key-Value database engine. It has an unofficial .Net wrapper. BDB has an open source version but you'd have to distribute your source too if your program doesn't stay internal (or pay the reportedly high license fee for the commerical version).

    Or there's MS's own Extensible Storage Engine, the one underlying Active Directory and Exchange. There doesn't seem to be a .Net wrapper, but there is a toolkit (http://www.iiobo.com/ExtensibleStorageEngine.aspx) that offers examples of c++/C# integration.

    Or you could try sqlite with one table.

     

    ESENT Managed Interface is an open-source project on Codeplex, developed by Laurion Burchall who's a software engineer on the ESE/ESENT team.

    I haven't used it myself, but I know the big advantage of ESE is that it's been a part of Windows since Windows 2000, so it doesn't require an additional install. The managed interface requires Windows XP or later (because it uses some features not present on the Windows 2000 version).

    Wikipedia has a fairly detailed article on ESE. Apart from Active Directory and Exchange, Windows Desktop Search also uses it.

  • User profile image
    LaurionB

    I wanted update this thread to point out that the ESENT Managed Interface project now has a PersistentDictionary class that does what you want: it implements IDictionary and is backed by a database which is automatically updated as changes are made:

     

    PersistentDictionary<string, string> dictionary = new PersistentDictionary<string, string>("Names");
    Console.WriteLine("What is your first name?");
    string firstName = Console.ReadLine();
    if (dictionary.ContainsKey(firstName))
    {
        Console.WriteLine("Welcome back {0} {1}", firstName, dictionary[firstName]);
    }
    else
    {
        Console.WriteLine("I don't know you, {0}. What is your last name?", firstName);
        dictionary[firstName] = Console.ReadLine();
    }

     

    Logging, recovery, memory management, logfile cleanup and multithreaded access are handled automatically.

     

    The big limitation of the PersistentDictionary is what the keys and values can be. The problem is that adding an object to a PersistentDictionary creates a copy of the object though serialization. Modifying the original object will not modify the copy, which would lead to confusing behavior. To avoid those problems the PersistentDictionary will only accept value types.

     

    The Codeplex download includes a short whitepaper giving more details and some basic performance measurements (10K updates/seconds, 30K lookups/second).

  • User profile image
    W3bbo

    Give SQLite.NET a try; it's a complete port of SQLite to C#/.NET in a pure managed assembly (woo for native x64!), downside: the assembly is 860KB which kinda dwarfs my 56KB application EXEs.

     

    Download the "managed only binaries" option.

  • User profile image
    GamlerHart

    Well a key-value storage / database would provide such a dictionary.

     

    There are quite a few of them out there. But I don't know any embedded key-value-storage one for .NET.

    So http://managedesent.codeplex.com/ looks promising.

  • User profile image
    ScottWelker

    I doubt it's in line with what you are looking for but others might consider Azure's Table Service.

    http://msdn.microsoft.com/en-us/library/dd179423.aspx

  • User profile image
    exoteric

    DCMonkey said:
    Bass said:
    *snip*

    There's BerkeleyDB, which is a fast Key-Value database engine. It has an unofficial .Net wrapper. BDB has an open source version but you'd have to distribute your source too if your program doesn't stay internal (or pay the reportedly high license fee for the commerical version).

    Or there's MS's own Extensible Storage Engine, the one underlying Active Directory and Exchange. There doesn't seem to be a .Net wrapper, but there is a toolkit (http://www.iiobo.com/ExtensibleStorageEngine.aspx) that offers examples of c++/C# integration.

    Or you could try sqlite with one table.

     

    HOLY CRAP!

     

    Windows comes with a high-performance database under the covers!

     

    Must. Absorb. News.

  • User profile image
    rhm

    exoteric said:
    DCMonkey said:
    *snip*

    HOLY CRAP!

     

    Windows comes with a high-performance database under the covers!

     

    Must. Absorb. News.

    From the description it seems to share a lot in common with Google's BigTable.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.