Which database would you recommend to use with C# (.NET) application?

后端 未结 13 1647
眼角桃花
眼角桃花 2021-01-05 08:38

I\'m developing a little project plan and I came to a point when I need to decide what local databse system to use.

The input data is going to be stored on webserver

相关标签:
13条回答
  • 2021-01-05 09:06

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

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

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

    0 讨论(0)
  • 2021-01-05 09:06

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

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

    0 讨论(0)
  • 2021-01-05 09:12

    I don't know of a good in-process database that is fully syntax and type compatible with MySQL. With that in mind, you have 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 of the MS database stack (excluding access) is that they have a compatible solution for whatever you're doing all the way from the desktop up to multi-datacenter clusters. If your app's scale changes or you need to ship data between two different classes of app, your database layer is taken care of.

    0 讨论(0)
  • 2021-01-05 09:12

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

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

    0 讨论(0)
  • 2021-01-05 09:13

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

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

    0 讨论(0)
  • 2021-01-05 09:14

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

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

    0 讨论(0)
提交回复
热议问题