Jump to content

SQL Server Compact

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 196.2.124.251 (talk) at 01:09, 21 March 2008 (Updated the section i added yesterday for clarity.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

SQL Server Compact
Filename extension
.sdf
Developed byMicrosoft
Type of formatRelational database

Microsoft SQL Server Compact (SQL CE) is a compact relational database produced by Microsoft for applications that run on mobile devices and desktops. Prior to the introduction of the desktop platform, it was known as SQL Server for Windows CE and SQL Server Mobile Edition. The latest release is the SQL Server Compact 3.5 supporting .NET Framework 2.0 as well as Windows Mobile 2003, 5.0 and 6.0. It is currently only 32-bit. SQL CE targets occasionally-connected applications and for applications with an embedded database.[1] It is free to download as well as redistribute.[1]

Overview

SQL Server Compact shares a common API with the other Microsoft SQL Server editions.[2] It also includes ADO.NET providers for data access using ADO.NET APIs, and built-in synchronization capabilities,[1] as well as support for LINQ and Entity Framework. Future releases will unify the synchronization capabilities with Microsoft Synchronization Services.[3] Unlike other editions of Microsoft SQL Server, SQL CE runs in-process[3] with the application which is hosting it; while having a memory footprint of less than 2 MB;[1] however, all SQL CE instances share the same memory pool.[4]

SQL CE databases are ACID-compliant. Like Microsoft SQL Server, SQL CE supports transactions, referential integrity constraints, locking as well as multiple connections to the database store.[2] However, nested transactions are not supported, even though parallel transactions (on different tables) are.[5] The current release does not support stored procedures[2] or native XML data type either.[3] It uses a subset of T-SQL[1] for querying and due to lack of XML support, XQuery is not supported either.[3] Queries are processed by an optimizing query processor.[6] SQL CE databases also support indexing, as well as support remote data replication (local caching of data in remote databases) and merge replication (bidirectional synchronization with master databases).[7] SQL CE databases can be created and managed from Microsoft Visual Studio and SQL Server Management Studio as well.[6]

SQL CE databases reside in a single .sdf file,[8], which can be up to 4 GB in size.[2] The .sdf file can be encrypted with 128-bit encryption for data security.[8] SQL CE runtime mediates concurrent multi-user access to the .sdf file. The .sdf file can simply be copied to the destination system for deployment, or be deployed through ClickOnce. SQL CE runtime has support for DataDirectories.[4] Applications using an SQL CE database need not specify the entire path to an .sdf file in the ADO.NET connection string, rather it can be specified as |DataDirectory|\<database_name>.sdf, defining the data directory (where the .sdf database file resides) being defined in the assembly manifest for the application.

SQL Server Management Studio 2005 can read and modify CE 3.0 and 3.1 database files (with the latest service pack), but the SQL Server Management Studio 2008 from the "Katmai" 2008 CTP release (or later) is required to read version 3.5 files.

See also

References

  1. ^ a b c d e "SQL Server 2005 Compact Edition Datasheet". Retrieved 2007-07-03.
  2. ^ a b c d "A Lap Around SQL Server 2005 Compact Edition". Retrieved 2005-07-03.
  3. ^ a b c d "SQL Server Everywhere: Just Another Database?". Retrieved 2007-07-03.
  4. ^ a b "What's New (SQL Server Compact Edition)". Retrieved 2007-07-03.
  5. ^ "Transactions (SQL Server Compact Edition)". Retrieved 2007-07-03.
  6. ^ a b "Overview of Databases (SQL Server Compact Edition)". Retrieved 2007-07-03.
  7. ^ "Overview of Databases (SQL Server Compact Edition)". Retrieved 2007-07-03.
  8. ^ a b "Data Storage Architecture with SQL Server 2005 Compact Edition". Retrieved 2007-07-03.

Template:MSNav