MBL290: Building Mobile Applications with Microsoft® SQL Server™ CE and the Microsoft .NET Compact Framework Kevin Collins Microsoft Senior Program Manager
MBL290:Building Mobile Applications with Microsoft® SQL Server™ CE and the Microsoft .NET Compact Framework
Kevin Collins
Microsoft
Senior Program Manager
Agenda
SQL Server CE Overview
SQL Server CE v2.0 Architecture and Features
Deployment and scaling case studies
SQL Server CE v2.0 release and licensing
SQL Server CE PositioningKey Scenarios – Occasionally connected data access
Sync database over high speed conectionCradle, 802.11b, or Ethernet
Use application offlineSubsequent sync in field via slower connection
GPRS, dial-upMS Mobile Scenarios
Mobile Web FormsAlways connectedWide device support (over 300), including PalmLimited UI
ADO.NET Data SetUtilize XML web servicesNo RI, QP, ability to query across data setsNot designed for large data setsNo compression on syncLimited sync and trackingSync to any backend database via XML
SQL Server CEQP, RI, query multiple tablesCompression on syncBuilt in tracking, strong sync to SQL Server Encryption
Nevalon – Real Estate MLSNevalon – Real Estate MLS http://www.nevalon.comhttp://www.nevalon.com
demodemo
Windows CE Platforms
PocketPC.NET CF in ROM for PPC 03
Many have 64MB RAM/ROM, USB, SD and CF support
PPC 2002+ exclusively ARM processor
EmbeddedVarying CPU/RAM/ROM
Smart PhoneEurope now, US this year
Small RAM
.NET CF in ROM for SP 03
SQL Server CE v2.0All Systems GO!
We RELEASED!9/16/02 Launch at VSLive!
Sim shipped with VS.NET 2003 in 04/03
OLEDB CEOLEDB CECLR / .NET CFCLR / .NET CF
QP/Cursor Engine/ES QP/Cursor Engine/ES
SQL Server CE v2.0 Device Data Access
ADOADOCE v3.1CE v3.1
Storage Engine / Repl TrackingStorage Engine / Repl Tracking
SQL Server CE v2.0SQL Server CE v2.0
eVB 3.0eVB 3.0eVC eVC 3.03.0
OLEDBOLEDB
OLEDBOLEDB
SQL Server CE 2.0 Data SQL Server CE 2.0 Data ProviderProvider
Native/UnmanagedNative/Unmanaged StackStack SDE / ManagedSDE / Managed StackStack
ADO.NETADO.NET
VS .NET (VB.NET, C#)VS .NET (VB.NET, C#)
Database Feature SetRich functionality for small footprint
Multi-column indexes
Referential integrity
Sub-selects (IN)
Defaults
Inner/outer joins
One file database
Null support
Unicode support
Transactions
Data-typesReal, Numeric, NVarChar, NText, Image, Integer, DateTime, VarBinary, UniqueIdentifier, Money
Having/group by
Seek on index
Set functions
Identity attribute
Local security - DB encryption (128bit) and database password
New V2.0 Features
UnionSELECT * FROM A UNION SELECT * FROM B
Intrinsic Functions (CASE, @IDENTITY)Parameterized Queries
INSERT INTO mytable (col1, col2) VALUES (?, ?);Index Pull
Brings indexes down with RDA PullConnectivity Setup Wizards
Ease installation of SQL CE Server componentsOptional Error Strings
Extra DLL to provide error strings in applicationIncreased index limit per tableEnhance ISQLWCE
OLEDB CEOLEDB CE
CLR / .NET CFCLR / .NET CF
QP/Cursor Engine/ES QP/Cursor Engine/ES
CE Data AccessStorage Architecture
Client Client Agent: Agent:
ReplicationReplicationandandRDARDA
ADO ADO CE CE v3.1v3.1
OLEDB / OLEDB / Replication APIReplication API
IISIIS
CLIENTCLIENT SERVERSERVER
Storage Engine / Repl Storage Engine / Repl TrackingTracking
SQL CE Edition v2.0SQL CE Edition v2.0
eVB eVB 3.03.0 eVC eVC
3.03.0
OLEDBOLEDB
OLEDBOLEDB
Server Server Agent: Agent:
ReplicationReplicationandand
Remote Remote Data Data
AccessAccess
HTTPHTTP
XML/BizTalk/CS 2002XML/BizTalk/CS 2002
802.11b, 802.11b, CDPD, CDPD, GSM, GSM,
CDMA, CDMA, TDMA, etc.TDMA, etc.
Enterprise BackendEnterprise Backend
Oracle / db2 / etcOracle / db2 / etc
SQL Server SQL Server CE Data CE Data ProviderProvider
Native/UnmanagedNative/Unmanaged StackStack
Data ProviderData Provider
SQL Server SQL Server Client Data Client Data Provider Provider
ADO.NETADO.NET
VS .NET (VB.NET, C#)VS .NET (VB.NET, C#)..NET CF / ManagedNET CF / Managed StackStack
TDSTDS
EthernetEthernet
Well Well ConnectedConnected
Occasionally Occasionally ConnectedConnected
Connectivity – Transport
Utilize Web technologyHTTP communication
Internet and Intranet
Security via IISAuthentication (anonymous, basic, NTLM)
Authorization
Encryption for secure transfer (SSL)
Access through firewalls
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
Connectivity – Remote Data Access
Access to SQL Server 7.0 & SQL Server 2000
Download to device and disconnect
Disconnected tracking capability
Extremely easy to setup and use
Effective scaling
Nabisco Case Study And Demo
1500 Delivery 1500 Delivery TrucksTrucks
107 Distribution 107 Distribution CentersCenters
802.11b RF802.11b RF
IBM DB/2IBM DB/2
XMLXML
SAP Business ObjectsSAP Business Objects
Ruggedized Ruggedized PocketPC DevicePocketPC Device
with SQL Server CEwith SQL Server CE
Nabisco Deployment
Rolled custom CAB fileOriginally used eMVT wizard
Load CAB file and database on CF cardAllows for cold boot recovery in field
Used version flag in publicationIf version changes, then it is replicated down to the deviceThis flags download of new CAB file from IIS server and updates latest version
Using SQL Server SP3 and QFE 798KB article 810185
SQL Server CE v2.0 Licensing
CAL/CPU license needed for connectivity to SQL ServerFree distribution rights on device
SQL Server CE Summary
Enables data capture in the fieldSmall size, robust functionality
Enables rapid developmentUtilizes new Visual Studio .NET tools
Existing application with eMVT still run
Enable robust connectivityHTTP, IIS, connect anywhere
RDA, Replication
Expand the enterpriseUpwardly compatible with SQL Server 2000
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx