简体   繁体   English

C#2008前端的数据库选择

[英]Database Choice for a C# 2008 front end

I was wondering what and why you would choose to be able to make a database that can support no more than 100 users with no more than 10 using it at once with a Visual Studio 2008 C# Windows Form front end to access it by. 我想知道为什么以及为什么您会选择能够通过Visual Studio 2008 C#Windows Form前端一次使用不超过10个用户而支持不超过100个用户的数据库。 I have to access the database over a network connection, not just on the local machine. 我必须通过网络连接访问数据库,而不仅仅是在本地计算机上。 I also need to define where the database is found at run-time in the code as opposed to the "Data Source" view in Visual Studio. 我还需要在运行时在代码中定义数据库的位置,而不是在Visual Studio中定义“数据源”视图。 If my question needs reframing or is not understood, let me know and I will adjust. 如果我的问题需要重新定义或无法理解,请告诉我,我会进行调整。 Part of my problem is I am not sure even how to ask the right question, much less what the answer is. 我的问题的一部分是我不确定如何提出正确的问题,更不用说答案了。

If it is not for comercial purposes you can try SQL Server 2008 Express. 如果不是出于商业目的,则可以尝试SQL Server 2008 Express。 It can integrate nicely with Visual Studio 2008 for development and has support for LINQ, Entity Data Model and ADO.NET Entity Framework to make it easy to create next generation data-enabled applications. 它可以与Visual Studio 2008很好地集成以进行开发,并支持LINQ,实体数据模型和ADO.NET实体框架,从而使创建下一代支持数据的应用程序变得容易。

http://www.microsoft.com/express/sql/default.aspx http://www.microsoft.com/express/sql/default.aspx

You can also store your connections strings in the application configuration file and retrieve them programatically for setting up the database connection. 您还可以将连接字符串存储在应用程序配置文件中,并以编程方式检索它们以建立数据库连接。

http://www.codeguru.com/columns/DotNet/article.php/c7987/ http://www.codeguru.com/columns/DotNet/article.php/c7987/

I would probably go with Sql Server Express, it's free and works well with .NET. 我可能会选择Sql Server Express,它是免费的,并且与.NET兼容。 Assuming your schema is not changing at runtime you can probably still use the design time data source features in Visual Studio. 假设您的架构在运行时没有更改,您可能仍可以在Visual Studio中使用设计时数据源功能。 The connection information is stored in the app.config file which you can update after the app is deployed to point to a different database. 连接信息存储在app.config文件中,您可以在部署应用程序后将其更新为指向其他数据库。 You can also develop a class that gets the connection info from somewhere else as well and just use that when you need to open a database connection. 您还可以开发一个从其他地方获取连接信息的类,并在需要打开数据库连接时使用它。

I know using mssql you can pick between different connection strings for all of your db calls, just do something like 我知道使用mssql可以为所有的db调用选择不同的连接字符串,就像

Command.Connection = GetMyConnectionWithWhateverLogicINeed(); Command.Connection = GetMyConnectionWithWhateverLogicINeed();

I'd have a look at Sql Server Workgroup Edition 我来看看Sql Server Workgroup Edition

http://www.microsoft.com/sql/editions/workgroup/ http://www.microsoft.com/sql/editions/workgroup/

Express edition used to have some limiting features for more than about 5 users and it is not supplied with any management tools which is a bit disheartening. Express Edition曾经具有超过5个用户的某些限制功能,并且没有提供任何令人沮丧的管理工具。

I'm not sure I totally get what you are asking, Matt, but I can tell you that I developed a series of apps written with VS 2008 and we used a MySQL DB for it. 我不确定我是否完全了解您的要求,Matt,但我可以告诉您,我开发了一系列用VS 2008编写的应用程序,并且为此使用了MySQL DB。 While I'm definitely not a DB guru at this point, I've not had many issues with using MySQL. 尽管我现在绝对不是数据库专家,但是使用MySQL并没有很多问题。

Perhaps if you rephrase your question, we can provide better answers. 也许如果您改写问题,我们可以提供更好的答案。

SQLite for sure. 肯定的SQLite。

ADO 2.0 Provider ADO 2.0提供程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM