Should I go with attaching the MDF file to SQL Express or the actual deployment of the script in SQL Server?

I am creating a blog-like publishing system on ASP.NET 4.0 (with EF 4.0) in which I want to be very easily deployable / fallback. I am at the point of deciding whether to create a system to create a database on SQL Server and use it (traditionally) or to have the MDF file App_Data on the site and simply attach to it using SQL Express. I know the limitations of the volume and volume of Express Express, and I will not be faced with restrictions, as this is not a critical business application or any serious material. Just a simple CMS with blogs / documents / photos (actual photos are NOT saved in the database, only their paths are saved in MDF) and what is it. I do not see a problem using MDF, but I am also not an expert on this topic, since I have never worked / never created a website using an MDF file. I've always deployed to SQL Server, but I don't want to deal with users / roles / permissions, and the last thing I want isso that the user has problems installing due to the database settings.

What should I go with? Any problems I would encounter with MDF? Recommendations?

+5
source share
1 answer

IF you are using SQL Server Express, which is the server . I would always choose the "real" approach to the database: attach your database to the server, access it by its database name, deploy SQL scripts to update it.

The fact that "attach the database from the path to the file" always seemed to me to be half-baked and rather dirty kludge.

- SQL Server Compact Edition, , in-process database, - , , VARCHAR(MAX) XML, - . , . , /

+2

All Articles