有人使用(或考虑使用)Sql Server精简版吗?

时间:2020-11-25 11:59:25

I've been preparing to deliver a presentation on SQL Server Compact Edition 3.5 (SP1 - recently released) and I was wondering if anyone had designed (or contemplated designing) a system with SQL Server CE 3.5 (or earlier versions)?

我一直在准备发布SQL Server Compact Edition 3.5 (SP1——最近发布的)的演示,我想知道是否有人设计(或设计)一个带有SQL Server CE 3.5(或更早版本)的系统?

In particular, has anyone thought of (or experienced) using SQLCE as a solution for offline data storage (as part of a connected system design)?

特别是,是否有人想到(或有经验)使用SQLCE作为脱机数据存储的解决方案(作为连接系统设计的一部分)?

Version 3.5 looks to be pretty feature rich compared to its predecessors, is it ready for serious consideration (now that it supports LINQ to SQL, identity columns and an assortment of important T-SQL)?

与以前的版本相比,3.5版本看起来非常丰富,它是否已经准备好认真考虑(现在它支持LINQ到SQL、标识列和各种重要的T-SQL)?

Would you consider using it if you had the need for a lightweight low-footprint file based database (especially if it needed to be supported on mobile devices and desktop systems), or are there better options?

如果您需要一个轻量级的低足迹文件数据库(特别是需要在移动设备和桌面系统上支持它),或者有更好的选择,您会考虑使用它吗?

9 个解决方案

#1


9  

At work, we recently had to migrate a project that was designed for SQL Server Express to SQLCE. At first I thought it was going to be awful, mainly due to the fact that there are no stored procedures. Once we started digging into it though, and saw what it DOES offer, we were convinced it was the right move. It supports LINQ, querying alot of data took MUCH quicker than we thought it would. Inserting and Updating were a little slower, but really not too bad at all. The only problems we ran into really were A) Management Studio 2005 doesn't support it, and although 2008 does, it's very limited. Not sure why, hopefully they'll change that for future releases, but it bugged the hell outta me. B) When trying to migrate an existing SQL Server DB to a SQLCE, there's really no easy way to create the schema from the existing one, and to move all the data. You'll probably have to roll your own tool to do that (we had to).

在工作中,我们最近不得不将为SQL Server Express设计的项目迁移到SQLCE。一开始我以为会很糟糕,主要是因为没有存储过程。一旦我们开始深入研究,并看到它提供了什么,我们确信这是正确的行动。它支持LINQ,查询大量数据的速度比我们想象的要快得多。插入和更新速度稍慢,但实际上还不算太糟。我们遇到的唯一问题实际上是A)管理工作室2005不支持它,虽然2008支持,但是非常有限。不知道为什么,希望他们会在以后的版本中改变这一点,但是这让我很不爽。B)当尝试将现有的SQL Server DB迁移到SQLCE时,确实没有简单的方法从现有的数据库创建模式,并移动所有的数据。您可能需要使用自己的工具来实现这一点(我们必须这样做)。

All that being said though, the end result was amazing. The install time was cut down to a third now that users didn't have to install SQL Express, and the application ran much smoother on machines with less memory. All in all, I was amazed at how well it actually works.

尽管如此,最终的结果还是令人惊叹。由于用户不必安装SQL Express,所以安装时间减少到了三分之一,而且应用程序在内存较少的机器上运行更顺畅。总之,我对它的实际效果感到惊讶。

#2


6  

I tried several versions of SQLCE and always ended up using the excellent ADO.NET SQLite implementation - it's lighter, faster, easier to use (at least for my purposes), and it's portable cross almost all platforms.

我尝试了几个版本的SQLCE,最后总是使用优秀的ADO。NET SQLite实现——它更轻、更快、更容易使用(至少对我来说是这样),而且几乎所有平台都可以移植。

#3


4  

i currently use SQL CE with NHibernate in a business applicatino where the SQL CE database gets synchronized with Sync Framework via WCF to an SQL 2008 server. works like a charm! especially generating the database from nhibernate mapping files is just awesome.

我目前在business applicatino中使用SQL CE和NHibernate,其中SQL CE数据库通过WCF与一个SQL 2008服务器同步。就像一个魅力!特别是从nhibernate映射文件生成数据库是非常棒的。

but even when using linq2sql it works pretty fine!

但是,即使使用linq2sql,它也非常好用!

#4


0  

Tried SQLCE several times. Always ended up using something else (Firebird (embedded), SQLite, VistaDB). IMO SQLCE is way to limited to be useful in more or less complex scenarios. Though I have no real-world experience with latest version (3.5) but I suspect it still sucks :)

尝试SQLCE好几次了。最后总是使用其他东西(Firebird(嵌入式)、SQLite、VistaDB)。IMO SQLCE是一种限制在或多或少复杂场景中使用的方法。虽然我没有最新版本(3.5)的实际经验,但我怀疑它仍然很糟糕:

#5


0  

I've helped developing and maintaining a PDA software that uses SQL Server CE 2.0. I think it's OK as long as you know where the limits are.

我帮助开发和维护了一个使用SQL Server CE 2.0的PDA软件。我认为只要你知道界限在哪就行。

#6


0  

I've used SQLCE once, for an exercise I've received in a job interview, and it was sufficient for just that. Now, whenever I need such functionality, I use sqlite or firebird.

我曾经使用过SQLCE,作为我在工作面试中收到的一个练习,它就足够了。现在,每当我需要这些功能时,我就使用sqlite或firebird。

The usability of SQLCE for that exercise was very good. It's quick, has good visual editor, and well integrated into Visual Studio.

这个练习的SQLCE的可用性非常好。它速度快,有很好的视觉编辑器,并且很好地集成到visual Studio中。

Bottom line: if you can handle the limitations of SQLCE, and you're SURE you won't need more than that - use it.

底线:如果您能够处理SQLCE的限制,并且您确信您不会需要更多的限制,那么就使用它。

#7


0  

If used on a mobile device then you cannot use Linq to SQL.

如果在移动设备上使用,则不能使用Linq to SQL。

We use it and it is nice, but Linq to Dataset is not as nice as Linq to SQL

我们使用它,它很好,但是Linq to Dataset没有Linq to SQL那么好

#8


0  

We used SQLCE (version 3.0 I believe) in a project a year or 2 ago.
Problem I had with it is that it needed an install, wasn't XCOpy deployable. Also the performance was horrible. we were doing about 20 inserts a second, which is probably outside of it's capabilities, but it definitally couldn't handle it. Performance and deployment problems have convinced me that there are better alternatives. my next project will use either SQLite or VistaDB.

我们在一两年前的一个项目中使用了SQLCE(我相信是3.0版本)。我遇到的问题是它需要安装,不是XCOpy可部署的。而且表演也很糟糕。我们每秒钟做20次插入,这可能超出了它的能力范围,但它肯定无法处理。性能和部署问题使我确信还有更好的替代方案。我的下一个项目将使用SQLite或VistaDB。

I've used SQLite on the Mac, and IPhone for developement, and it performs very well on both of those platforms.

我在Mac和IPhone上使用了SQLite进行开发,在这两个平台上都表现得很好。

#9


0  

There is a problem if you use SQLCE 3.5 SP1 with Entity Framework. Basically there is a problem when passing some parameters to a query. The work around is to uninstall the SQLCE and install another version released as a hotfix. The problem with that is when trying to include the SQLCE in a setup project. More about the subject can be found in this thread: http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/b6bac277-cf66-4c74-a0b3-e48abedbd161

如果使用SQLCE 3.5 SP1和实体框架,就会出现问题。基本上,在向查询传递一些参数时存在一个问题。解决方法是卸载SQLCE并安装作为热修复程序发布的另一个版本。这样做的问题是当试图在安装项目中包含SQLCE时。关于这个主题的更多信息可以在这个帖子中找到:http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/b6bac277-cf66-4c74-a0b3-e48abedbd161

Another strange problem is that SQLCE 3.5 SP1 with entity framework will not work on 64 bits systems unless you build it to target x86 (http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/aa5850bb-34fe-4064-82b0-4a7cac675c91/)

另一个奇怪的问题是,带有实体框架的SQLCE 3.5 SP1不能在64位系统上工作,除非您将其构建为目标x86 (http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/aa5850bb-34fe-4064-82b0-4a7cac675c91/))。

#1


9  

At work, we recently had to migrate a project that was designed for SQL Server Express to SQLCE. At first I thought it was going to be awful, mainly due to the fact that there are no stored procedures. Once we started digging into it though, and saw what it DOES offer, we were convinced it was the right move. It supports LINQ, querying alot of data took MUCH quicker than we thought it would. Inserting and Updating were a little slower, but really not too bad at all. The only problems we ran into really were A) Management Studio 2005 doesn't support it, and although 2008 does, it's very limited. Not sure why, hopefully they'll change that for future releases, but it bugged the hell outta me. B) When trying to migrate an existing SQL Server DB to a SQLCE, there's really no easy way to create the schema from the existing one, and to move all the data. You'll probably have to roll your own tool to do that (we had to).

在工作中,我们最近不得不将为SQL Server Express设计的项目迁移到SQLCE。一开始我以为会很糟糕,主要是因为没有存储过程。一旦我们开始深入研究,并看到它提供了什么,我们确信这是正确的行动。它支持LINQ,查询大量数据的速度比我们想象的要快得多。插入和更新速度稍慢,但实际上还不算太糟。我们遇到的唯一问题实际上是A)管理工作室2005不支持它,虽然2008支持,但是非常有限。不知道为什么,希望他们会在以后的版本中改变这一点,但是这让我很不爽。B)当尝试将现有的SQL Server DB迁移到SQLCE时,确实没有简单的方法从现有的数据库创建模式,并移动所有的数据。您可能需要使用自己的工具来实现这一点(我们必须这样做)。

All that being said though, the end result was amazing. The install time was cut down to a third now that users didn't have to install SQL Express, and the application ran much smoother on machines with less memory. All in all, I was amazed at how well it actually works.

尽管如此,最终的结果还是令人惊叹。由于用户不必安装SQL Express,所以安装时间减少到了三分之一,而且应用程序在内存较少的机器上运行更顺畅。总之,我对它的实际效果感到惊讶。

#2


6  

I tried several versions of SQLCE and always ended up using the excellent ADO.NET SQLite implementation - it's lighter, faster, easier to use (at least for my purposes), and it's portable cross almost all platforms.

我尝试了几个版本的SQLCE,最后总是使用优秀的ADO。NET SQLite实现——它更轻、更快、更容易使用(至少对我来说是这样),而且几乎所有平台都可以移植。

#3


4  

i currently use SQL CE with NHibernate in a business applicatino where the SQL CE database gets synchronized with Sync Framework via WCF to an SQL 2008 server. works like a charm! especially generating the database from nhibernate mapping files is just awesome.

我目前在business applicatino中使用SQL CE和NHibernate,其中SQL CE数据库通过WCF与一个SQL 2008服务器同步。就像一个魅力!特别是从nhibernate映射文件生成数据库是非常棒的。

but even when using linq2sql it works pretty fine!

但是,即使使用linq2sql,它也非常好用!

#4


0  

Tried SQLCE several times. Always ended up using something else (Firebird (embedded), SQLite, VistaDB). IMO SQLCE is way to limited to be useful in more or less complex scenarios. Though I have no real-world experience with latest version (3.5) but I suspect it still sucks :)

尝试SQLCE好几次了。最后总是使用其他东西(Firebird(嵌入式)、SQLite、VistaDB)。IMO SQLCE是一种限制在或多或少复杂场景中使用的方法。虽然我没有最新版本(3.5)的实际经验,但我怀疑它仍然很糟糕:

#5


0  

I've helped developing and maintaining a PDA software that uses SQL Server CE 2.0. I think it's OK as long as you know where the limits are.

我帮助开发和维护了一个使用SQL Server CE 2.0的PDA软件。我认为只要你知道界限在哪就行。

#6


0  

I've used SQLCE once, for an exercise I've received in a job interview, and it was sufficient for just that. Now, whenever I need such functionality, I use sqlite or firebird.

我曾经使用过SQLCE,作为我在工作面试中收到的一个练习,它就足够了。现在,每当我需要这些功能时,我就使用sqlite或firebird。

The usability of SQLCE for that exercise was very good. It's quick, has good visual editor, and well integrated into Visual Studio.

这个练习的SQLCE的可用性非常好。它速度快,有很好的视觉编辑器,并且很好地集成到visual Studio中。

Bottom line: if you can handle the limitations of SQLCE, and you're SURE you won't need more than that - use it.

底线:如果您能够处理SQLCE的限制,并且您确信您不会需要更多的限制,那么就使用它。

#7


0  

If used on a mobile device then you cannot use Linq to SQL.

如果在移动设备上使用,则不能使用Linq to SQL。

We use it and it is nice, but Linq to Dataset is not as nice as Linq to SQL

我们使用它,它很好,但是Linq to Dataset没有Linq to SQL那么好

#8


0  

We used SQLCE (version 3.0 I believe) in a project a year or 2 ago.
Problem I had with it is that it needed an install, wasn't XCOpy deployable. Also the performance was horrible. we were doing about 20 inserts a second, which is probably outside of it's capabilities, but it definitally couldn't handle it. Performance and deployment problems have convinced me that there are better alternatives. my next project will use either SQLite or VistaDB.

我们在一两年前的一个项目中使用了SQLCE(我相信是3.0版本)。我遇到的问题是它需要安装,不是XCOpy可部署的。而且表演也很糟糕。我们每秒钟做20次插入,这可能超出了它的能力范围,但它肯定无法处理。性能和部署问题使我确信还有更好的替代方案。我的下一个项目将使用SQLite或VistaDB。

I've used SQLite on the Mac, and IPhone for developement, and it performs very well on both of those platforms.

我在Mac和IPhone上使用了SQLite进行开发,在这两个平台上都表现得很好。

#9


0  

There is a problem if you use SQLCE 3.5 SP1 with Entity Framework. Basically there is a problem when passing some parameters to a query. The work around is to uninstall the SQLCE and install another version released as a hotfix. The problem with that is when trying to include the SQLCE in a setup project. More about the subject can be found in this thread: http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/b6bac277-cf66-4c74-a0b3-e48abedbd161

如果使用SQLCE 3.5 SP1和实体框架,就会出现问题。基本上,在向查询传递一些参数时存在一个问题。解决方法是卸载SQLCE并安装作为热修复程序发布的另一个版本。这样做的问题是当试图在安装项目中包含SQLCE时。关于这个主题的更多信息可以在这个帖子中找到:http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/b6bac277-cf66-4c74-a0b3-e48abedbd161

Another strange problem is that SQLCE 3.5 SP1 with entity framework will not work on 64 bits systems unless you build it to target x86 (http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/aa5850bb-34fe-4064-82b0-4a7cac675c91/)

另一个奇怪的问题是,带有实体框架的SQLCE 3.5 SP1不能在64位系统上工作,除非您将其构建为目标x86 (http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/aa5850bb-34fe-4064-82b0-4a7cac675c91/))。