What is a good choice of database for a small .NET

2019-01-20 21:10发布

I'm developing a small application with C# in .NET and I want to have a small light weight database which does not use much resources.

Could you please list some of the best known light weight database softwares.

11条回答
\"骚年 ilove
2楼-- · 2019-01-20 21:57

Firebird embedded can be a good choice

The embedded version is an amazing variation of the server. It is a fully featured Firebird server packed in just a few files. It is very easy to deploy, since there is no need to install the server.

There is some very good dot net drivers

查看更多
倾城 Initia
3楼-- · 2019-01-20 22:00

I'd recommend SQLite. We are using it for almost all of the apps we develop where I work.

It's small and compact. It does require a DLL to be in the app directory, but you don't have to have other software installed like Access or SQL Server. Also, as stated by danielkza below, "SQLite is public domain, so you don't have to worry at all about licensing." That can really make a big difference.

You can use System.Data.SQLite or csharp-sqlite to access it in a C# app using the same methods as that of SQL or OleDB.

You will also need an application to edit/manage the database. The best one in my opinion is SQLite Studio. Here are a couple more:
SQLite Admin
SQLite 2009 Pro (bottom of the page)
Update - 7/25/11 - More SQLite apps (question here on SO)

Here's more on SQLite:
SQLite on Wikipedia
Companies that use SQLite

Custom Functions: As an addition, if you are looking in the SQLite Core Functions and don't see one you like, you can create your own custom functions. Here are a couple of examples:
From SO
Anoter example

查看更多
叼着烟拽天下
4楼-- · 2019-01-20 22:03

If you are building a project with .NET 4.0.2 or greater and want embedded database support, consider SQL Server Express LocalDB.

It's a relatively new addition to the Express family that features a smaller installation footprint and reduced management overhead (when compared to other editions of Express), yet it maintains the programmability aspects of SQL Server. That is, unlike Compact Edition, LocalDB does not require the installation of a separate ADO.NET provider to communicate with SQL.

See the following for more details:

SQL Express v LocalDB v SQL Compact Edition (MSDN Blogs)
SQL LocalDB vs SQL Server CE (Stack Overflow)

查看更多
smile是对你的礼貌
5楼-- · 2019-01-20 22:03

I've used db4o with success.
File based, large community, simple to use.

http://www.db4o.com/

Licensing Details

Free General Public License db4o is licensed under the GPL by default.

The GPL license is ideal if you plan to use db4o in house or you plan to develop and distribute your own derivative work as free software under the GPL as well.

Commercial License A commercial license is required if you want to embed db4o in a commercial non-GPL product. Commercial licensees gain access to premium services and support.

查看更多
登录 后发表回答