Comparison of SQL Server Compact, SQLite, SQL Server Express and LocalDB
Information about LocalDB comes from here and SQL Server 2014 Books Online. LocalDB is the full SQL Server Express engine, but invoked directly from the client provider. It is a replacement of the current “User Instance” feature in SQL Server Express.
Feature |
SQL Server Compact 3.5 SP2 |
SQL Server Compact 4.0 |
SQLite, incl SQLite ADO.NET Provider |
SQL Server |
SQL Server 2012 LocalDB |
Deployment/ Installation Features |
|||||
Installation size |
2.5 MB download size |
2.5 MB download size |
10 MB download, 14 MB expanded on disk |
120 MB download size |
32 MB download size |
ClickOnce deployment |
Yes |
Yes |
Yes |
Yes |
Yes |
Privately installed, embedded, with the application |
Yes |
Yes |
Yes |
No |
No |
Non-admin installation option |
Yes |
Yes |
Yes |
No |
No |
Runs under ASP.NET |
No |
Yes |
Yes |
Yes |
Yes |
Runs on Windows Mobile / Windows Phone platform |
Yes |
No |
Yes |
No |
No |
Runs on WinRT (Phone/Store Apps) |
No |
No |
Yes |
No |
No |
Runs on non-Microsoft platforms |
No |
No |
Yes |
No |
No |
Installed centrally with an MSI |
Yes |
Yes |
Yes |
Yes |
Yes |
Runs in-process with application |
Yes |
Yes |
Yes |
No |
No (as process started by app) |
64-bit support |
Yes |
Yes |
Yes |
Yes |
Yes |
Runs as a service |
No – In process with application |
No - In process with application |
No - In process with application |
Yes |
No – as launched process |
Data file features |
|||||
File format |
Single file |
Single file |
Single file |
Multiple files |
Multiple files |
Data file storage on a network share |
No |
No |
No |
No |
No |
Support for different file extensions |
Yes |
Yes |
Yes |
No |
No |
Database size support |
4 GB |
4 GB |
140 TB |
10 GB |
10 GB |
XML storage |
Yes – stored as ntext |
Yes - stored as ntext |
Yes, stored as text |
Yes, native |
Yes, native |
Binary (BLOB) storage |
Yes – stored as image |
Yes - stored as image |
Yes |
Yes |
Yes |
FILESTREAM support |
No |
No |
No |
Yes |
No |
Code free, document safe, file format |
Yes |
Yes |
No |
No |
|
Programmability |
|||||
Transact-SQL - Common Query Features |
Yes |
Yes |
No |
Yes |
Yes |
Procedural T-SQL - Select Case, If, features |
No |
No |
Limited |
Yes |
Yes |
Remote Data Access (RDA) |
Yes |
No (not supported) |
No |
No |
No |
ADO.NET Sync Framework |
Yes |
No |
No |
Yes |
Yes |
LINQ to SQL |
Yes |
No |
Yes |
Yes |
|
ADO.NET Entity Framework 4.1 |
Yes (no Code First) |
Yes |
Yes |
Yes |
Yes |
ADO.NET Entity Framework 6 |
Yes (fully) |
Yes (fully) |
Yes (limited) |
Yes |
Yes |
Subscriber for merge replication |
Yes |
No |
No |
Yes |
No |
Simple transactions |
Yes |
Yes |
Yes |
Yes |
Yes |
Distributed transactions |
No |
No |
No |
Yes |
Yes |
Native XML, XQuery/XPath |
No |
No |
No |
Yes |
Yes |
Stored procedures, views, triggers |
No |
No |
Views and triggers |
Yes |
Yes |
Role-based security |
No |
No |
No |
Yes |
Yes |
Number of concurrent connections |
256 (100) |
256 |
Unlimited |
Unlimited |
Unlimited (but only local) |
There is also a table here that allows you to determine which Transact-SQL commands, features, and data types are supported by SQL Server Compact 3.5 (which are the same a 4.0 with very few exceptions), compared with SQL Server 2005 and 2008.
参考
作者:旭东
出处:http://www.cnblogs.com/HQFZ
关于作者:专注于微软平台项目架构、管理和企业解决方案。现主要从事WinForm、ASP.NET、WPF、WCF、等方面的项目开发、架构、管理。如有问题或建议,请不吝指教!
本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。如有问题,可以联系我,非常感谢。
如果您该文觉得不错或者对你有帮助,请点下推荐,让更多的朋友看到,谢谢!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?