何时。自卫队时使用的.mdf和? [英] When to use .mdf and when .sdf?

查看:128
本文介绍了何时。自卫队时使用的.mdf和?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看到很多在互联网上的东西我还没有发现这两个文件类型之间的任何解释后:密度纤维板。自卫队

After seeing a lot of things in the internet I haven't found any explanation between the two file types: .mdf and .sdf.

。自卫队将SQL服务器(密度纤维板)我相信的压缩版本。他们仍然会出现完全不同的。

.sdf would be a compact version of SQL Server (.mdf) I believe. Still they appear utterly different.

遵循MSDN上,即<一两个教程href=\"http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3\">MVC电影应用和 Musicstore 。两者都使用。自卫队

Have followed the two tutorials on msdn, i.e. MVC Movie App and the Musicstore. Both use .sdf.

部分报价():首先它应该是| DataDirectory目录| ASPNETDBContext.mdf(注意扩展差)。您的应用程......

Partial quote (full): 'First of all it should be "|DataDirectory|ASPNETDBContext.mdf" (notice the extension difference). Your applic...'

这两个教程有连接字符串。自卫队,即:

Both tutorials have the connection string to .sdf, i.e.:

<add name             ="MovieDBContext"
     connectionString ="Data Source=|DataDirectory|Movies.sdf" 
     providerName     ="System.Data.SqlServerCe.4.0"
/>

<add name             ="MusicStoreEntities" 
     connectionString ="Data Source=|DataDirectory|MvcMusicStore.sdf" 
     providerName     ="System.Data.SqlServerCe.4.0"
/> 

问:

我的问题是用什么何时何地?在更多的为什么使用哪个哪里。

My question is what to use where and when? More over why to use which where.

推荐答案

SQL Server精简(SDF文件)在Windows电话流行,用于存储某些数据(数据的小计),也可能在网站使用,但它有表现不佳,甚至SQLite是更好的。

SQL Server Compact (sdf files) popular in Windows phone for storing some data (small count of data), also it could be used in web sites, but it has poor performance, even SQLite is better.

在大网站用大量的数据使用SQL服务器(MDF文件)。它的功能更强大,但不能在手机中使用,且必须安装在服务器上。

SQL Server (mdf files) used in big sites with a lot of data. Its more powerful, but cant be used in phones and must be installed on servers.

看看这个:比较时,SQL Server防爆preSS 2012年的LocalDB

这篇关于何时。自卫队时使用的.mdf和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆