Embedded database for .net

随声附和 提交于 2019-11-27 04:16:50

问题


I need an embedded database for one of our .net applications.

This database should support sql (Unlike Berkley).

Can anyone suggest any options.


回答1:


The major options I think are:

  • SQLite
  • SQL Server Compact (Linq Support)
  • VistaDB (Linq Support)
  • SharpHSQL
  • Embedded Firebird
  • Blackfish SQL



回答2:


I just wanted to chime in late here with more information on VistaDB.

Our SQL Syntax is very close with SQL Server syntax, and we include TSQL and CLR Stored Procs.

Runs in process with your application, and you only have to deploy 1 assembly for both 32 and 64 bit (100% managed code). You can't do this with SQL CE since you have different unmanaged assemblies that have to be deployed.

You can embed VistaDB with your app and even ILMERGE it, change the database name, etc to fully hide the engine from your users (some people are real big on this).

And yes it can also run on Mono since it is 100% managed code. There are still a few issues (including non-Intel Mono machines).

Full disclosure - I am the owner of the company




回答3:


SQL Server Compact Edition is the smart choice for .NET compact framework. I found Arcane Code to be a very helpful site for learning SSCE. He is an MVP for SQL Server and focuses on CE.




回答4:


Have a look at SQL Server Compact edition. It runs in-proc, it is a single binary and it stores its data in a single file, and it supports concurrency (unlike many other embedded DBs, including SQLite). Plus you probably already have it if you're using Visual Studio. Finally, it is free to use and redistribute.




回答5:


I really like FirebirdSQL myself (Also mentioned by CMS). It can run embedded with the windows dll's, iirc there's even a mixed binary with the core driver built in for this. It works well with ActiveRecord, and NHibernate as well. Most .Net types map easily.

One advantage over other options, is switching to a RDBMS mode is only a matter of changing the querystring to use a server, instead of the embedded version. You can also run with it in Linux (unfortunately not in embedded mode), if you have any desire to target Mono in the future.



来源:https://stackoverflow.com/questions/684595/embedded-database-for-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!