[ACCEPTED]-Which database would you recommend to use with C# (.NET) application?-local

Accepted answer
Score: 13

I want to say Microsoft Sql 2005 Express, as 6 it (almost) comes as the obvious choice 5 when developing in .NET.

But it all depends 4 on what previous db skills you have. If 3 you already know MySql and as you already 2 said, the data should be exported back to 1 MySql. Why not use MySql all the way?

Score: 8

For quick and dirty I'd go with Sql Server Compact Edition. Its an 11 in-process implementation of Sql Server, so 10 it doesn't require you install any other 9 applications.

Back in the day, you'd use 8 an Access database for this kind of thing. But 7 Access databases kinda blow.

It wouldn't 6 take much to upload your finished data back 5 to the production server. If you're looking 4 for a solution that automates that process, you'll 3 probably need to look at hosting an instance 2 of MySql locally and use whatever replication 1 services it provides.

Score: 2

I say go with Sql Server Compact Edition. It's 12 real similar to the full blown version of 11 SQL Server, and VS2008 has built in support 10 for designing tables, querying etc. (Management 9 Studio 2008 also has support for it). The 8 biggest downside is that you lose out on 7 stored procedures, but the upside is great 6 as there's no need to install anything on 5 the local users machine, and it works real 4 fast for selecting data. Even cooler, is 3 that with SQL Metal, you can create a DBML 2 file and use LINQ just as you would with 1 Sql Server.

Score: 1

How about using db4o? It's an OODB you can 6 embed in your application. Also supports 5 replication. Edit: As a side note - In my current pet 4 project using db4o I have a line (C# 3.5):

IList<Users> list = Persistence.Database.Query<Users>(u => u.Name == "Admin");

Using 3 strong typed lambda expression to get a 2 (lazy) list of objects from the database. It 1 also uses indexes to retrieve the list quickly.

Score: 0

MS SQL Server support comes out of the box 4 without any other drivers or setup required. Also, MS 3 SQL Server Express is free.

You can generate 2 scripts that will export the data to/from 1 MySQL.

Score: 0

The "obvious" choice would be 12 MS SQL Server Express. VS and .net both 11 support it natively and if you've experience 10 with it already (for the main DB), I'd certainly 9 be tempted to stick with it (or its express 8 version).

But that's certainly not the end 7 of your options. I use SQLite a lot for 6 cross-platform applications and web-apps. It's 5 eye-wateringly-fast and it does integrate 4 pretty well through System.Data.SQLite -- albeit not as tightly 3 as MS SQL Server.

There's also a Compact 2 edition of SQL Server that compares quite 1 well to SQLite.

Score: 0

I don't know of a good in-process database 11 that is fully syntax and type compatible 10 with MySQL. With that in mind, you have 9 three options:

  1. Choose something like SQLlite, Access, or SQL Server Compact. The problem is that you'll end up writing some complex conversion logic with any of those and have to write all your queries twice.
  2. Install MySQL locally. Then you have to put up with having a full database server running on your local system. You definitely want to avoid this for anything you'll ship to a customer, but for your own use it might be ok. Fortunately, MySQL doesn't use as many resources as some other modern database servers, but this is still less than ideal.
  3. Switch to SQL Server Express edition at the server and use SQL Server Compact at the client. It's just as cheap as MySQL (maybe even cheaper, since you're supposed purchase MySQL for any commercial use). Considering that you're using C# at the client end, you might want to use it with ASP.Net at the server side as well. And if you're using ASP.Net server side, then it's not difficult to find a host that offers SQL Server Express. Now your databases are type compatible and any query you write for you client is guaranteed to work for your server as well.

IMO, one of the big strengths 8 of the MS database stack (excluding access) is 7 that they have a compatible solution for 6 whatever you're doing all the way from the 5 desktop up to multi-datacenter clusters. If 4 your app's scale changes or you need to 3 ship data between two different classes 2 of app, your database layer is taken care 1 of.

Score: 0

Pick anything that's available, but code 8 against interfaces only, that way you can 7 easily switch between them.

For production, I'd 6 say either MS SQL for large projects, (or 5 express for mid level) simply because of 4 the close integration with VS and Sqlite 3 for smaller projects.

Given the description, I 2 would think that Sqlite would be a good 1 choice, since it's the simplest/lowest overhead.

Score: 0

I've been doing some testing as of late 4 and though I'd also recommend SQL Server 3 2005 (Express if needed) because it works 2 out of the box though SQL Server 2008 is 1 new and RTM'd now.

Score: 0

SQL Server as most have mentioned... My 4 reason would be cos you can use the source 3 control to integrate the test cases from 2 C# to database....

Team foundation (TFS) is 1 one such from Microsoft with GUI...

Score: 0

Since this is already answered. I have to 20 mention when working with CLR languages, CLR/.NET 19 Framework Integration sets MS SQL Server 18 2005/2008 apart from the rest. Following 17 excerpt from here.

By using languages such as 16 Visual Basic .NET and C#, you can capitalize on 15 CLR integration to write code that has 14 more complex logic and is more suited 13 for computation tasks. Additionally, Visual 12 Basic .NET and C# offer object-oriented 11 capabilities such as encapsulation, inheritance, and 10 polymorphism. You can easily organize 9 related code into classes and namespaces, which 8 means that you can more easily organize 7 and maintain your code investments when 6 you are working with large amounts of 5 code. The ability to logically and physically organize 4 code into assemblies and namespaces is 3 a huge benefit that enables you to better 2 find and relate different pieces of code 1 in a large database implementation.

More Related questions