标签云

可以从网络上运行的嵌入式数据库

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 drive, but only used by 1 user at a time.

Now, my first idea was SQL Server Compact edition. That is really nicely integreated, but it can not run off a network.

Firebird seems to have the same issue, but the .net Integration seems to be not really first-class and is largely undocumented.

Blackfish SQL looks interesting, but there is no trial of the .net Version. Pricing is also OK.

Any other suggestions of something that works well with .net and runs off a network without the need of actually installing a server software?

2016年12月11日54分09秒

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

2016年12月10日54分09秒

I'd recommend Advantage Database Server (www.advantagedatabase.com). It's a mature embedded DB with great support and accessible from many development languages in addition to .NET. The "local" version is free, runs within your application in the form of a DLL, requires no installation on the server/network share, and supports all major DB features. You can store the DB and/or application files all on the network; it doesn't care where the data is.

Disclaimer: I am an engineer in the ADS R&D group. I promise, it rocks :)

2016年12月10日54分09秒

It sounds like ADO/Access is perfect for your needs. It's baked into the MS stack, well seasoned, and multi-user.

You can programatically create a DB like so:

Dim catalog as New ADOX.Catalog
Catalog.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\server\path\to\db.mdb")

You can then use standard ADO.NET methods to interact with the database.

2016年12月10日54分09秒

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.

2016年12月10日54分09秒

A little late to the post here.. And VistaDB is already mentioned, but I wanted to point out that VistaDB is 100% managed (since your post was tagged .net). It can run from a shared network drive, and is 1MB xcopy deployed.

Since you mention SQL CE, we also support T-SQL Syntax and datatypes (in fact more than SQL CE) and have updateable views, TSQL Procs and other things missing in SQL CE.

2016年12月10日54分09秒

Check out VistaDB. They have a very good product, the server version (3.4) is in Beta and is very close to release.

2016年12月10日54分09秒

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

2016年12月10日54分09秒

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.

2016年12月10日54分09秒

Have you considered an OODB? From the various open sources alternatives I recommend db4o (sorry for the self promotion :)) which can run either embedded or in client/server mode.

Best

Adriano

2016年12月10日54分09秒

There's also Valentina. I cam e across this product when I was working on some Real Basic project. The RB version is very good.

2016年12月10日54分09秒