SQL Server Express 是适用于 ASP.NET MVC Web 应用程序的数据库吗
我即将开始构建一个依赖数据库作为后端的 ASP.NET MVC Web 应用程序(大惊喜)。
作为一名学生,我可以(通过 Dreamspark)访问 SQL Server 2008 Developer Edition,并且通过默认的 VS 2008 安装,我已经安装了 SQL Server Express 2005。
我见过的许多 MVC 示例都使用本地 .mdf(SQL 数据库)作为后端。
我的问题是:
我应该使用本地数据库文件进行初始开发和设计吗? (SQL Server Express) 或者我应该安装 2008 开发版并使用“正确的”数据库?
这是我最终打算作为公共站点启动的应用程序,因此我希望为此构建。
I am about to start building a ASP.NET MVC web application that relies on a database as it's backend (big surprise).
As a student, I have access (via Dreamspark) to SQL Server 2008 Developer Edition, and with the default VS 2008 install, I have SQL Server Express 2005 installed already.
Many of the examples on MVC I have seen use a local .mdf (SQL database) as their backend.
My question is:
Should I use a local database file for initial development and design? (SQL Server Express) or should I install the 2008 dev edition and use a "proper" database instead?
This is an application that I eventually intend to launch as a public site, so I'm looking to build for that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在开始使用开发版之前,您需要了解它是什么以及使用它的限制。
SQLExpress 非常适合开发人员和发布产品时使用。它具有与 SQL Standard 相同的引擎,但有一些限制,例如最大文件大小为 4GB(我认为它也有 RAM 限制,但不确定)。您可以使用 SQL Express 作为您网站的后端,无需额外的许可费用(即免费)。我曾在一个地方工作过,他们开发了一种将 SQL Express 的多个实例链接在一起的系统,只是为了绕过 4GB 文件限制 - 但请注意,这可能会违反它的许可证。
SQL Developer实际上是SQL Enterprise,但没有操作系统上的安装时间限制。您也不得在生产中使用 SQL Developer(即用于您的实时应用程序)。对于大多数用途,您在 SQL Developer 上编写的任何代码也可以在 SQL Express 上执行,但您必须小心不要使用任何 Enterprise 功能 - 许可 Enterprise 可能是一个昂贵的选择。
所以继续使用 SQL Express,它是一个不错的选择。
PS - 我假设您的数据库不会高负载 - 如果是,那么您需要考虑标准或企业。
Before you start using the Development edition, you need to be aware what it is and what the limitations are of you using it.
SQLExpress is perfectly fine for using, both for dev and when you release your product. It has the same engine as SQL Standard, but with a couple restrictions in place, such as a max file size of 4GB (and i think it also has a RAM limit, but not sure on that one). You are allowed to use SQL Express as the backend for your website with no extra licencing costs (i.e. - free). I have worked at one place where they worked out a system of chaining several instances of SQL Express together just to get round the 4GB file limit - but be aware that this may contravene the licence of it.
SQL Developer is actually SQL Enterprise, but without the install time restriction on OS. You are also not permitted to use SQL Developer in production (i.e. for your live app). For most purposes whatever you code on SQL Developer can also execute on SQL express, but you have to be careful not to use any of the Enterprise features - licencing Enterprise can be a pricey option.
So go ahead and use SQL Express, it is a good option.
P.S. - i am assuming that your database won't be high load - if it is then you would need to consider either Standard or Enterprise.
您可以使用其中任何一个来开发 ASP.NET MVC 应用程序。 Express 版本适用于基本应用程序,除非您有需要企业功能的高负载应用程序。
如果您打算实时启动应用程序,那么这取决于应用程序将拥有的流量。另外,据我所知,开发者版仅供开发人员使用,不能在生产环境中使用。
You can develop an ASP.NET MVC application using any of them. Express edition is ok for basic application unless you have a high load application that requires enterprise features.
If you intent to launch the application live then it depends on the traffic the application will have. Also, as far as I know Developer edition is for developers only and cannot be used in production environment.
这只是因为提供带有演示和示例的物理
.mdf
文件(而不是数据库脚本或类似的东西)非常容易。您会在许多教程中找到.mdf
文件,并且这与 ASP.NET MVC 本身无关。您看到的示例很可能都使用 ADO.NET,它在任何应用程序中的工作方式都是相同的。无论数据库提供商如何,您都应该对您的 Web 应用程序进行压力测试,以了解您每秒可以处理多少个并发用户以及多少个请求。
在这里,有 一篇关于提高 ASP.NET MVC Web 应用程序性能的好文章。
This is only because it's very easy to provide physical
.mdf
files with demos and examples (instead of database scripts or something similar). You would find.mdf
files in many tutorials, and this has nothing to do with ASP.NET MVC itself. The examples you have seen most likely all use ADO.NET, which works the same in any application.Regardless of database provider , you should stress-test your web application to find out just how many concurrent users and how many requests per second you can handle.
Here, have a good article on improving performance with ASP.NET MVC web applications.