Sei sulla pagina 1di 6

DAT413: SQL Server CE: Building Mobile Applications With SQL Server CE And Smart Device Extensions

Kevin Collins Senior Program Manager Microsoft Corporation

Agenda
SQL Server CE overview Deployment platforms Smart Device Extensions (SDE) overview SQL Server CE v2.0 architecture and features Deployment and scaling case study

SQL Server CE Overview


Key scenarios
Disconnected database Internet/intranet connectivity/ synchronization Different from Mobile Web Forms/MMIT, ADO.NET Data Set, and MSMQ CE Managed and unmanaged support

Customer scenarios
Medical, military, DSD, FSA, SFA, real estate

Windows CE Platforms
H/PC 2K (Jornada 720, Intermec 6651)
No .NET CF support, Native support Typically have keyboard Many have 32mb ROM/RAM PC Card/USB

.NET CF Development Sequence


Deployment Options Source Code (Hello.*) Visual Studio .NET Windows CE Emulator Compliers .NET Compact Framework Class Libs Hello.exe .NET Compact Framework Class Libs .NET Compact Framework CLR Win32 Device

PocketPC/PocketPC 2002 (Intermec 700, Compaq iPaq) iPaq)


No keyboard .NET CF Support and Native support Many have 64MB RAM/ROM, USB, and CF support

Hello.exe .NET Compact Framework Class Libs .NET Compact Framework CLR

Hello.exe .NET Compact Framework Class Libs .NET Compact Framework CLR

Embedded (Intermec 5020)


Varying CPU/RAM/ROM PB 3.0 Native support PB 4.0 .NET CF support

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

.NET CF Class Libraries


System.Web
Services Description Discovery Protocols Caching Configuration Security SessionState UI HtmlControls WebControls Design

System.WinForms
ComponentModel

SQL Server CE v2.0 Device Data Access


SDE/Managed Stack Native/Unmanaged Stack VS .NET (VB.NET, C#) ADO.NET

eVB 3.0
System.Drawing
Drawing2D Imaging Printing Text

ADO CE v3.1

eVC 3.0

SQL Server CE 2.0 Data Provider CLR / .NET CF OLEDB CE

System.Data
ADO.NET Design SqlClient SqlServerCe Xslt/XPath

System.Xml
XmlDocument Serialization Reader/Writers SQL Server CE v2.0
OLEDB QP/Cursor Engine/ES

System
Collections Security Text Globalization IO Net Reflection Resources Configuration ServiceProcess Diagnostics Threading Runtime InteropServices Remoting Serialization

OLEDB Storage Engine / Repl Tracking

SQL Server CE v2.0 Platform Support


Tool Set
eMVT eMVT eMVT VS.NET / .NET CF VS.NET / .NET CF VS.NET / .NET CF eMVT

SQL Server 2000 Windows CE Edition v2.0


Upward compatibility with SQL Server
Same result sets Compatible data types

Data Access
ADOCE / OLEDBCE ADOCE / OLEDBCE ADOCE / OLEDBCE ADO.NET ADO.NET ADO.NET ADOCE / OLEDBCE

Platform
HPC 2K PocketPC PB 3.0 PocketPC 2002 PocketPC PB 4.1 (Jameson) PocketPC 2002

Right footprint size for devices


~800kb for X86 CPU

OS support
Windows CE 3.0 forward
PocketPC, PocketPC 2002, HPC 2K, PB 3.0, PB 4.0

Windows CE 2.11 support dropped


PPC, HPC

Database Feature Set


Rich functionality for small footprint
Multi-column indexes MultiReferential integrity Sub-selects (IN) SubDefaults Inner/outer joins One file database Null support Unicode support Transactions Data-types DataReal, Numeric, NVarChar, NVarChar, NText, Image, Integer, NText, DateTime, VarBinary, DateTime, VarBinary, UniqueIdentifier, Money UniqueIdentifier,

New V2.0 Features


Intrinsic functions
ABS ACOS ASIN ATAN ATN2 CEILING COS COT DEGREES EXP FLOOR LOG LOG10 PI POWER RADIANS RAND ROUND SIGN SQRT NEWID TAN UNICODE CHAR CHARINDEX LEN LOWER LTRIM PATINDEX REPLACE REPLICATE @IDENTITY RTRIM SPACE STR STUFF SUBSTRING UPPER CASE COALESCE CONVERT DATALENGTH

Having/group by Seek on index Set functions Identity attribute Local security - DB encryption (128-bit) and (128database password

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

New V2.0 Features


Union
SELECT * FROM A UNION SELECT * FROM B

New V2.0 Features


SQL Server Client Data Provider
Direct access to SQL Server

Parameterized Queries
INSERT INTO mytable (col1, col2) VALUES (?, ?);

Enhanced ISQLW

Index Pull
Brings indexes down with RDA Pull

Connectivity Setup Wizards


Ease installation of SQL CE Server components

Optional Error Strings


Extra DLL to provide error strings in application

Increased index limit per table

demo
ISQLW CE, New SQL

SQL Server CE V2.0 .NET Integration


ADO .NET
System.Data.SqlClient
Direct connection to SQL Server Rich interaction with the server
Full TSQL Stored Procedures

System.Data.SqlServerCE
Local data provider Rich data access while offline Exposes full functionality of SQL Server CE

SQL Server CE Error Handling


Utilizes try/catch
System.Data.SqlServerCe.SqlCeException

CE Data Access Storage Architecture .NET CF / Managed Stack


Native/Unmanaged Stack

Enterprise Backend Oracle/db2/etc.

VS .NET (VB.NET, C#) ADO.NET


Ethernet TDS Well Connected

XML/BizTalk/CS 2002

eVB 3.0
ADO CE v3.1

eVC 3.0
OLEDB CE

SQL Server CE Data Provider

SQL Server Client Data Provider

CLR / .NET CF

SQL CE Edition v2.0


OLEDB QP/Cursor Engine/ES OLEDB Storage Engine / Repl Tracking

Data Provider Client Agent: Replication and RDA

802.11b, CDPD, GSM, CDMA, TDMA, etc.

OLEDB / Replication API Server Agent: Replication and Remote Data Access

IIS
HTTP Occasionally Connected

CLIENT

SERVER

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

Connectivity
Transport
Utilize Web technology
HTTP communication
Internet and Intranet

Connectivity
Merge replication
SQL Server 2000 features crucial for SQL Server CE
Vertical and horizontal partitioning Dynamic horizontal filters Auto ranged identity columns Standard/custom conflict resolvers

Security via Internet Information Server (IIS)


Authentication (anonymous, basic, NTLM) Authorization Encryption for secure transfer (SSL)

Access through firewalls

Merge Replication APIs


System.Data.SQLServerCe.Engine.CreateDatabase
Replaces AddSubscription Method Creates blank database

Connectivity
Remote data access
Access to SQL Server 6.5 sp5+ Download to device and disconnect Disconnected tracking capability Extremely easy to setup and use Effective scaling

System.Data.SQLServerCe.Replication.Synchronize
Replaces previous methods
Initialize Run Terminate

Initial Sync
Creates schema, downloads data, creates constraints

Subsequent Sync
Push modified data up, then bring modified data down

Remote Data Access


APIs
System.Data.SQLServerCe.RemoteDataAccess.Pull
Brings data from server to device Data selected via SQL statements Creates and populates local table Allows for tracked and untracked data

demo
SQL Server CE Connectivity

System.Data.SQLServerCe.RemoteDataAccess.Push
Sends modified data to server

System.Data.SQLServerCe.RemoteDataAccess. System.Data.SQLServerCe.RemoteDataAccess. SubmitSQL


Pass SQL DML statement

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

demo
SQL Server CE Data Provider Connectivity

Nabisco Case Study And Demo


IBM DB/2 802.11b RF

SAP Business Objects Ruggedized PocketPC Device with SQL Server CE 107 Distribution Centers XML

Web Server 1500 Delivery Trucks

SQL Server 2000 Failover

Nabisco Deployment

demo
Nabisco

Rolled custom CAB file


Originally used eMVT wizard

Load CAB file and database on CF card


Allows for cold boot recovery in field

Used version flag in publication


If version changes, then it is replicated down to the device This flags download of new CAB file from IIS server and updates latest version

SQL Server CE v2.0 Licensing


Included with Smart Device Extension (SDE)
SQL Server CE and SQL Server CE server side components Developer and test license Need SQL Server Developer Edition with Visual Studio .NET Standard and Pro

SQL Server CE Summary


Enables data capture in the field
Small size, robust functionality

Enables rapid development


Utilizes new Visual Studio .NET tools Existing application with eMVT still run

SQL Server 2000 Developer Edition


$499 U.S.D. Web download SQL Server CE One developer license Allows for distribution of SQL Server CE Allows for testing end to end connectivity

Enable robust connectivity


HTTP, IIS, connect anywhere RDA, Replication

Expand the enterprise


Upwardly compatible with SQL Server 2000

CAL/CPU license needed for connectivity to SQL Server

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

Discussion

Next Steps
SQL Server CE
Get the Visual Studio .NET Smart Device Extensions Beta Join the Beta Program (sscebeta@microsoft.com) (sscebeta@microsoft.com)

Notification Services
Join the Beta Program

Web Services Toolkit


Pick one up from the SQL Server booth Download from
http://www.microsoft.com/sql/techinfo/xml http://www.microsoft.com/sql/techinfo/xml

2001 Microsoft Corporation. All rights reserved.

PDC 2001 October 22-26, 2001


2001 Microsoft Corporation. All rights reserved.

Potrebbero piacerti anche