Embedded Database for .net that can run off a network

后端 未结 11 1479
轮回少年
轮回少年 2020-12-28 12:57

I was (and still am) looking for an embedded database to be used in a .net (c#) application. The caveat: The Application (or at least the database) is stored on a Network dr

相关标签:
11条回答
  • 2020-12-28 13:22

    SQLite came to my mind while reading your question, and I'm quite sure that it's possible to access it from a network drive if you keep yourself to the constraint of 1 user at a time.

    SQLite on .NET - Get up and running in 3 minutes

    0 讨论(0)
  • 2020-12-28 13:23

    Why not use SQL Server 2005 Express edition?

    It really depends on what you mean by "embedded" - but you can redistribute SQLServer2005E with your applications and the user never has to know it's there.

    Embedding SQL Server Express in Applications

    Embedding SQL Server Express into Custom Applications

    0 讨论(0)
  • 2020-12-28 13:26

    This question is now ancient, and a lot has changed. For my specific purposes, LiteDB is the option of choice. It's open source and has a GitHub Repository.

    Apart from that, SQLite is basically the industry standard for embedded databases. There are attempts to port the code to .NET, but the prime use case involves a native library (e.g., the sqlite Nuget package) and/or a .NET P/Invoke wrapper like Microsoft.Data.SQLite.

    0 讨论(0)
  • You can use the firebird embeded, it's just a dll that you will need to ship with you app.

    About things being undocumented, that's not really true, the firebird .NET driver implements the ADO Interfaces, so if you know ADO you can work with Firebird, basically instead of SQLConnection you will use FBConnection and so on, but my advice is to write a data access layer and use just interfaces on your code, something like this:

    using FirebirdSql.Data.FirebirdClient;
    
    public static IDbConnection MyConnection()
    {
        FbConnection cn = new FbConnection("...");
        return cn;
    }
    

    This example is very simple, but you will not need much more than that.

    We use firebird for our all application without any problems, you should at least try it out.

    0 讨论(0)
  • 2020-12-28 13:30

    I'm puzzled.

    You're asking for an embeded database - where the database itself is stored on the server. that translates to storing the data file on a network share. You then say that SQL Compact Edition won't work... except that if one looks at this document:

    Word Document:
    Choosing Between SQL Server 2005 Compact Edition and SQL Server 2005 Express Edition

    On page 8 you have a nice big green tick next to "Data file storage on a network share".

    So it seems to me that your first thought was the right one.

    0 讨论(0)
提交回复
热议问题