Book description
SQL Server Compact Edition is a slimmed down version of SQL Server that you can use on Pocket PCs, Smart phones, Tablet PCs, and Desktops. With this book, you will learn how to build applications for resource constrained devices. You’ll discover how the SQL Server Compact Edition database can also be used as an embedded in-proc database for desktop-based applications. You’ll learn how to manage the SQL Server Compact Edition database using SQL Server Management Studio, Visual Studio, and Query Analyzer.
Laptops, Tablet PCs, and mobile devices enable information workers to access enterprise data from remote locations. With the step-by-step exercises provided in this book, you’ll learn how to synchronize data between SQL Server and SQL Server Compact Edition. You’ll also learn Remote Data Access–a lightweight method to exchange data between SQL Server and SQL Server Compact Edition. Also in this book are code samples to help you write database applications for mobile devices and for desktop PCs. Throughout the book you’ll find expert tips for building and deploying enterprise applications.
Understand how to…
Build mobile and desktop applications using SQL Server Compact Edition
Set up the development and production environment with Visual Studio, SQL Server, and SQL Server Compact Edition
Optimize performance and plan for security
Manage databases using SQL Server Management Studio, Visual Studio, and Query Analyzer
Develop applications using ADO.NET and OLEDB provider for SQL Server Compact Edition
Upgrade from earlier versions of SQL CE, .NET Compact Framework, and Visual Studio
Use Merge Replication to synchronize data between SQL Server and SQL Server Compact Edition
Exchange data between SQL Server and SQL Server Compact Edition using Remote Data Access
Introduction 1
1 Getting Started with SQL Server 2005 Compact Edition 7
2 Platform Support and Installation35
3 Getting to Know the Tools 63
4 Managing the SQL Server 2005 Compact Edition Database 109
5 Defining Database Structure 131
6 Manipulating the Database 175
7 Programming SQL Server 2005 Compact Edition with ADO.NET 205
8 Introducing Native Access 247
9 Using Operators in SQL Server 2005 Compact Edition 279
10 Using the Built-In Functions 295
11 Upgrading from a Previous Version 327
12 Synchronizing Data with Merge Replication 345
13 Synchronizing Data with Remote Data Access 411
14 Securing the SQL Server 2005 Compact Edition Database 459
15 SQL Server 2005 Compact Edition Performance Tuning 505
Index 551
Table of contents
- Copyright
- About the Authors
- Acknowledgments
- We Want to Hear from You!
-
Introduction
-
Overview of the Book
- Chapter 1: Getting Started with SQL Server 2005 Compact Edition
- Chapter 2: Platform Support and Installation
- Chapter 3: Getting to Know the Tools
- Chapter 4: Managing the SQL Server 2005 Compact Edition Database
- Chapter 5: Defining Database Structure
- Chapter 6: Manipulating the Database
- Chapter 7: Programming SQL Server 2005 Compact Edition with ADO.NET
- Chapter 8: Introducing Native Access
- Chapter 9: Using Operators in SQL Server 2005 Compact Edition
- Chapter 10: Using the Built-In Functions
- Chapter 11: Upgrading from a Previous Version
- Chapter 12: Synchronizing Data with Merge Replication
- Chapter 13: Synchronizing Data with Remote Data Access
- Chapter 14: Securing the SQL Server 2005 Compact Edition Database
- Chapter 15: SQL Server 2005 Compact Edition Performance Tuning
- How This Book Will Help You
-
Overview of the Book
-
1. Getting Started with SQL Server 2005 Compact Edition
- Design Goals
-
Features
- Relational Database Functionality in a Small Footprint
- Transaction Support
- Robust Data Support
- Small Footprint
- Security Features
- Multiuser Access
- Integration with SQL Server 2005 and Visual Studio 2005
- Common Programming Model
- Single Data file
- Easy Deployment
- Data Synchronization
- Locking and Isolation Levels
- Result Set
- Named Parameter
- Cost-Based Query Optimizer
- Integration Services Support
- Evolution of SQL Server Compact Edition
- Differences Between Versions 3.1 and 3.0
- Architectural Fundamentals
- Compact Edition Features Related to SQL Server 2005 Features
- Summary
-
2. Platform Support and Installation
- Software and Hardware Requirements
- Obtaining SQL CE
- Setting Up the Environment
- Installing SQL Server Compact Edition
- Getting Familiarized with SQL Server Compact Edition Components on a Developer Computer
- Deploying and Distributing SQL Server Compact Edition Applications
- Packaging the Application
- Summary
-
3. Getting to Know the Tools
-
Using SQL Server Management Studio
- Starting SQL Server Management Studio
- Getting Connected to SQL Server Compact Edition Database
-
Using Object Explorer
- Disconnecting from the SQL Server Compact Edition Database
- Connecting to SQL Server Compact Edition Database from Object Explorer
- Registering a Database Server
- Connecting to a Registered Database
- Using Tables Node
- Using Views Node
- Tables
- Columns
- Indexes
- Key_Column_Usage
- Table_Constraint
- Referential_Constraints
- Provider_Types
- Using the Programmability Node
- Using the Replication Node
- Using the Query Editor
- Using a Graphical Execution Plan
- Managing the Database
- Using Replication Wizards
- Using the Query Analyzer
- Using Visual Studio
- Summary
-
Using SQL Server Management Studio
- 4. Managing the SQL Server 2005 Compact Edition Database
-
5. Defining the Database Structure
- Creating a Table
- Updating a Table Definition
- Dropping a Table
- Creating Indexes
- Viewing and Modifying Index Properties
- Deleting an Index
- Using Templates
- Using Metadata
- Creating a Database Project Using Visual Studio
- Summary
- 6. Manipulating the Database
- 7. Programming SQL Server 2005 Compact Edition with ADO.NET
-
8. Introducing Native Access
- Understanding the Difference between Managed and Unmanaged Access
- Managing the Database
-
Understanding OLE DB
-
Introducing the OLE DB Object Model
- Understanding the Data Source Object
- Differences in Data Source Object
- Changing the Current Data Source
- Current Catalog
- Knowing the Session Object
- Knowing the Command Object
- Using the Rowset Object
- Knowing the Cursors Object
- Forward Only Cursor
- Base Table Cursor
- Scrollable Cursor
- Using the Index Object
- Using the Parameters Object
- Using the Constraint Object
- Using the Transaction Object
- Understanding the Difference in Transaction Support
- Understanding the OLE DB Data Type
- Standard OLE DB Interfaces for SQL Server Compact Edition
- Understanding the OLE DB Interfaces Differences
- The OLE DB Property Set
-
Using Provider-Specific Properties
- DBPROPSET_SSCE_DBINIT Property Set
- DBPROP_SSCE_MAXBUFFERSIZE
- DBPROP_SSCE_DBPASSWORD
- DBPROP_SSCE_DEFAULT_LOCK_ESCALATION
- DBPROP_SSCE_ENCRYPTDATABASE
- DBPROP_SSCE_TEMPFILE_DIRECTORY
- DBPROP_SSCE_DEFAULT_LOCK_TIMEOUT
- DBPROP_SSCE_AUTO_SHRINK_THRESHOLD
- DBPROP_SSCE_FLUSH_INTERVAL
- DBPROP_SSCE_MAX_DATABASE_SIZE
- DBPROP_SSCE_TEMPFILE_MAX_SIZE
- DBPROPSET_SSCE_SESSION
- DBPROP_SSCE_LOCK_TIMEOUT
- DBPROP_SSCE_LOCK_ESCALATION
- DBPROP_SSCE_TRANSACTION_COMMIT_MODE
- DBPROP_SSCE_COLUMN
- DBPROP_SSCE_COL_ROWGUID
- DBPROPSET_SSCE_ROWSET
- DBPROP_SSCE_LOCK_HINT
- Using OLE DB Properties
- Using Column Properties
- DBPROP_COL_AUTOINCREMENT
- DBPROP_COL_DEFAULT
- DBPROP_COL_FIXEDLENGTH
- DBPROP_COL_INCREMENT
- DBPROP_COL_ISLONG
- DBPROP_COL_NULLABLE
- DBROP_COL_SEED
- Using the Data Source Information Property Group
- DBPROP_ALTERCOLUMN
- DBPROP_COLUMNDEFINITION
- DBPROP_DBMSNAME
- DBPROP_DBMSVER
- DBPROP_DSOTHREADMODEL
- DBPROP_IDENTIFERCASE
- DBPROP_MULTIPLESTORAGEOBJECTS
- DBPROP_NULLCOLLATION
- DBPROP_OLEOBJECTS
- DBPROP_OPENROWSETSUPPORT
- DBPROP_PROVIDERFILENAME
- DBPROP_PROVIDEROLEDBVER
- DBPROP_PROVIDERVER
- DBPROP_STRUCTUREDSTORAGE
- DBPROP_SUPPORTEDTXNDDL
- DBPROP_SUPPORTEDTXNISOLEVELS
- DBPROP_SUPPORTEDTXNISORETAIN
- Using Initialization Properties: DBPROP_INIT_DATASOURCE
- DBPROP_INIT_LCID
- DBPROP_INIT_MODE
- Using Rowset Properties
- DBPROP_ABORTPRESERVE
- DBPROP_ACCESSORDER
- DBPROP_BLOCKINGSTORAGEOBJECTS
- DBPROP_BOOKMARKS
- DBPROP_BOOKMARKTYPE
- DBPROP_CANFETCHBACKWARDS
- DBPROP_CANHOLDROWS
- DBPROP_CANSCROLLBACKWARDS
- DBPROP_CHANGEINSERTEDROWS
- DBPROP_COMMITPRESERVE
- DBPROP_DEFERRED
- DBPROP_DELAYSTORAGEOBJECTS
- DBPROP_IACCESSOR
- DBPROP_ICOLUMNSINFO
- DBPROP_ICONVERTTYPE
- DBPROP_ILOCKBYTES
- DBPROP_IROWSET
- DBPROP_IROWSETUPDATE and DBPROP_IROWSETCHANGE
- DBPROP_IROWSETINFO
- DBPROP_IROWSETINDEX and DBPROP_IROWSETCURRENTINDEX
- DBPROP_IROWSETBOOKMARK
- DBPROP_ISEQUENTIALSTREAM
- DBPROP_ISUPPORTERRORINFO
- DBPROP_IMMOBILEROWS
- DBPROP_LOCKMODE
- DBPROP_MAXOPENROWS
- DBPROP_MAXROWS
- DBPROP_OTHERSINSERT
- DBPROP_OTHERSUPDATEDELETE
- DBPROP_OWNINSERT
- DBPROP_OWNUPDATEDELETE
- DBPROP_QUICKRESTART
- DBPROP_REMOVEDELETED
- DBPROP_REPORTMULTIPLECHANGES
- DBPROP_ROWTHREADMODEL
- DBPROP_SERVERDATAONINSERT
- DBPROP_UPDATABILITY
- Using Index Properties
- DBPROP_INDEX_AUTOUPDATE
- DBPROP_INDEX_NULLCOLLATION
- DBPROP_INDEX_NULLS
- DBPROP_INDEX_TYPE
- DBPROP_INDEX_UNIQUE
- Managing the Database with OLE DB
-
Introducing the OLE DB Object Model
- Summary
-
9. Using Operators in SQL Server 2005 Compact Edition
- Arithmetic Operators
- The Assignment Operator
- Bitwise Operators
- The Comparison Operator
- Logical Operators
- String Concatenation Operator
- Unary Operators
- Precedence Rules
- Summary
-
10. Using the Built-In Functions
- Mathematical Functions
- Aggregate Functions
- String Functions
- DATETIME Functions
- System Functions
- Others
- Summary
- 11. Upgrading from a Previous Version
-
12. Synchronizing Data with Merge Replication
-
Merge Replication Scenarios and Features
- Scenarios
-
Features
- Download Database from SQL Server to SQL Server Compact Edition
- Data Manipulation at Central SQL Server
- Data Manipulation at Remote SQL Server Compact Edition
- Data Synchronization Capability Between SQL Server and SQL Server Compact Edition
- Programmable Data Synchronization
- Schema Changes
- Conflict Resolution at the Time of Synchronization
- Data Filtering
- Applying Additional Business Logic for Synchronization
- Tools and Wizards
- Compression
- Encryption
- Security
- Synchronization Recovery
- GPRS Connectivity
- Merge Replication Architecture Components
-
Using Merge Replication
- Installing SQL Server Compact Server Components
- Configuring the Web Server
- Data Publishing
- Distributor Server Details
- Snapshot Folder
- Publication Database
- Type of Publication
- Articles
- Filtering
- Snapshot Agent Schedule
- Account Name for Snapshot Agent
- Publication Name
- How to Create a Publication
- Publication Wizard
- Stored Procedure
- Data Subscribing
- Specify Publication and Publisher Database
- Specify Subscriber or Subscriber Host Name
- Specify Authentication Mechanism for Web Server
- Copying a Subscription to Multiple Clients
- Subscribing to Multiple Publications
- How to Create a Subscription
- Subscription Wizard
- AddSubscription Method
- Data Synchronizing
- ReinitializeSubscription
- DropSubscription
- Merge Replication Exercise
-
Configuring SQL Server Compact Edition Server Components
- Starting the Configure Web Synchronization Wizard
- Choosing a Subscriber Type
- Providing Web Server Details and Creating a Virtual Directory
- Completing the Web Synchronization Configuration
- Creating a Subscription
- Monitoring Replication
- Viewing Snapshot Agent Status
- Viewing and Modifying Publisher Properties
- Creating a Device Application in Visual Studio 2005
- Synchronizing Data with SQL Server 2000
- Developing Connected Smart Device Applications with SqlClient
- Summary
-
Merge Replication Scenarios and Features
-
13. Synchronizing Data with Remote Data Access
- Remote Data Access Scenarios
- Remote Data Access Features
- Remote Data Access Architecture
-
Using Remote Data Access
- Installing the Server Agent Component
- Configuring the Virtual Directory
-
Programming for RDA
- Setting the SqlCeRemoteDataAccess Project Properties
- Pulling Remote Data into a Local Database
- Using Pull Method
- Tracking Changes
- Restrictions on Tracking
- Data Type Conversion
- Error Logging
- Changing the Pulled Table
- Restrictions
- Allowed Changes
- Pushing Local Changes Back to Remote Database
- Using Push Method
- Batch Option
- Handling of Conflict
- Executing SQL Statements on Remote Database
- Using SubmitSQL Method
- Restrictions in RDA
- Remote Data Access Exercise
- Connectivity Options
-
Feature Comparison
- Conflicts
- Single Versus Multiple Table Pull
- Referential Integrity Transfer
- Identity Columns
- Tools
- Server Side Changes
- Configurations
- Synchronization Control
- Server Side Schema Changes
- Bidirectional Versus Single Directional Changes
- Download Only Articles
- Filtering Tables
- Summary of RDA and Merge Replication Features
- Advantages and Disadvantages of Using Web Service as Synchronization Mechanism
- Synchronizing Microsoft Access Data with SQL Server Compact Edition
- Summary
-
14. Securing the SQL Server 2005 Compact Edition Database
- Securing the Client Database
- Exploring the Web Server Security Options
- SQL Server Security Options
-
Security Planning for Connectivity
-
Securing Web Server
- Choose Channel for Transmission
- Using HTTP
- Using HTTPS and Secure Socket Layer
- Configuring Security and Authentication Requirements
- Setting for Anonymous Access
- Setting for Basic Authentication
- Setting for Integrated Windows Authentication
- Virtual Directory Permission
- Authorization for Accessing the Server Agent
- Setting Replication and RDA Object Properties for Web Server
- Configuring the SQL Server Database
-
Programming for Secured Web Server and Backend Database
- Setting Replication and RDA Properties for Client Database
- Programming for Anonymous and SQL Server Access
- Replication
- RDA
- Programming for Anonymous and Windows Integrated Access
- Replication
- RDA
- Programming for Basic Authentication and SQL Server Authentication Access
- Replication
- RDA
- Programming for Basic and Windows Integrated Access
- Replication
- RDA
- Programming for Windows Integrated and SQL Server Authentication Access
- Replication
- RDA
- Programming for Windows Integrated Access Both at Web Server and SQL Server
- Replication
- RDA
- Recommended Practices
-
Securing Web Server
- Summary
- 15. SQL Server 2005 Compact Edition Performance Tuning
Product information
- Title: Microsoft SQL Server 2005, Compact Edition
- Author(s):
- Release date: July 2007
- Publisher(s): Sams
- ISBN: 9780672329227
You might also like
book
Programming SQL Server 2005
SQL Server 2005, Microsoft's next-generation data management and analysis solution, represents a huge leap forward. It …
book
Microsoft® SQL Server® 2008 Internals
Delve inside the core SQL Server engine—and put that knowledge to work—with guidance from a team …
book
Microsoft® SQL Server™ 2008 All-In-One Desk Reference For Dummies®
If you’re in charge of database administration, developing database software, or looking for database solutions for …
book
Inside Microsoft® SQL Server® 2008: T-SQL Programming
Get a detailed look at the internal architecture of T-SQL with this comprehensive programming reference. Database …