SQL LocalDB 与 SQL Server CE

我有一个小项目,它将在 1 台计算机上有 1 个用户.数据库将相当小(可能少于 1 mb 的数据).我计划在该项目中使用 WPF 和实体框架.

I have a small project that will have 1 user on 1 computer. The database will be rather small (probably less than 1 mb of data). I plan to use WPF and Entity Framework for that project.

我为我的项目提出了 2 个潜在的数据库解决方案:SQL Server CE 和 SQL Server Express LocalDB(使用 SQL Server 2012).我从未使用过其中任何一个,我更习惯于使用完整的 SQL Server 2008 安装.

I came up with 2 potential database solutions for my project : SQL Server CE and SQL Server Express LocalDB (with SQL Server 2012). I have never worked with any of those, I'm more used to work with the full SQL Server 2008 installation.

我还希望它易于在客户端上安装.理想情况下,我只想将一堆文件放在一个文件夹中(连同我的 .exe 文件).

I also want it to be easy to install on the client. Ideally I'd like to just throw a bunch of files on a folder (along with my .exe file).

所以这里有人可以向我推荐最好的技术吗?

So anybody here could suggest me the best technology to use?

谢谢!

推荐答案

请参阅介绍 SQL Server Express 本地数据库运行时 演示文稿 - 提供了很好的概述.

See the Introducing SQL Server Express Local DB Runtime presentation - gives a great overview.

LocalDB 的巨大优势在于它是真正的 SQL Server——它是 SQL Server Express 的一个特殊版本,但它基本上支持真正的"SQL Server 所拥有的一切——空间数据类型、存储过程——你能想到的.

The huge benefit of LocalDB is that it's real SQL Server - it's a special version of SQL Server Express, but it basically supports everything that "real" SQL Server has - spatial data types, stored procedures - you name it.

另一方面,SQL Server Compact Edition 是一个非常缩小的版本 - 不支持许多功能和数据类型.它更小,更敏捷" - 但它缺乏很多冲击力.

SQL Server Compact Edition on the other hand is a very much scaled down version - lot of features and datatypes aren't supported. It's smaller and more "agile" - but it lacks a lot of punch.

我个人会在 SQL Server CE 4 上选择带有 LocalDB 运行时的 SQL Server Express - 除非您特别需要 SQL Server CE 的小尺寸(例如在移动设备上).

I personally would pick SQL Server Express with the LocalDB runtime over SQL Server CE 4 - unless you specifically need the tiny size of SQL Server CE (e.g. on a mobile device).

另见SQL Server CE 3.5、CE之间的比较4.0、SQL Server Express 2008 R2 和 SQL Server 2012 Express LocalDB,位于 ErikEJ 的优秀Everything SQL Server Compact 网站.

Also see a comparison between SQL Server CE 3.5, CE 4.0, SQL Server Express 2008 R2 and SQL Server 2012 Express LocalDB on ErikEJ's excellent Everything SQL Server Compact web site.

相关文章