Embedded database for .net
Asked Answered
O

6

20

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

This database should support sql (Unlike Berkley).

Can anyone suggest any options.

Osteen answered 26/3, 2009 at 5:13 Comment(0)
H
27

The major options I can think of are:

Holystone answered 26/3, 2009 at 5:16 Comment(1)
just an article about entity framework and Firebird embedded firebirdnews.org/?p=2665Pontificate
F
15

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

Filiform answered 7/5, 2009 at 3:34 Comment(0)
S
6

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.

Shrive answered 26/3, 2009 at 5:30 Comment(3)
Nice integration with tools. What is the license requirement? cost?Thumbsdown
Sadly, it's not really a single binary. It has several native DLLs, which also creates the issue of x86 vs x64.Shericesheridan
You're right Mauricio. For managed code, it looks like there are only two binaries required, sqlceme35.dll and System.Data.SqlServerCe.dll. For native code, synchronization services, etc. there are other bins.Shrive
W
5

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.

Winkle answered 26/3, 2009 at 5:31 Comment(1)
You can create only tables and indexes in CEOsteen
M
2

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.

Morgun answered 26/3, 2009 at 5:37 Comment(0)
L
0

SQLite is definitely a popular database, but it is in native C++. If you are looking for a pure .NET DB, then LiteDB I think is worth considering:

See https://tomaskohl.com/code/2020-04-07/trying-out-litedb/ and https://www.litedb.org/docs/getting-started/

Loraineloralee answered 24/3, 2023 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.