What's the difference between the database inside App_Data folder vs connecting to SQL Server?

偶尔善良 提交于 2019-12-04 06:55:37

The "MDF in the App_Data" folder works for web site and web apps, and it works only with SQL Server Express (2005, 2008, 2008 R2). This is the version that's typically installed along with Visual Studio, and which works fine as a dev environment.

SQL Server Express has a few limitations on

  • number of CPU used (1)
  • max. size of a database (4 GB for 2005/2008, 10 GB for 2008 R2)
  • max. amount of RAM used (max. 1 GB)

and more. It's a great and free way to get into SQL Server development.

If you need production level SQL Server, then you're probably going to use a full version - Web, Workgroup, Standard, Enterprise or any of the highest level DataCenter editions.

There's a pretty comprehensive Compare SQL Server 2008 R2 Editions page up at Microsoft - go check it out!

The programming experience should be identical, too - it's really just a question of the ADO.NET connection string (and whether or not you need to have a locally installed SQL Server Express instance present).

The database file format is totally identical, so you can absolutely start with a .mdf file in your App_Data folder, and later move "up" to a full edition of SQL Server - simply attach your MDF file to your server instance, and now use that database. Works seamlessly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!