Download presentation
Presentation is loading. Please wait.
Published byElinor Poole Modified over 9 years ago
1
The What, Why, and How... Nino Benvenuti MVP – Device Application Development http://nino.net/blog
2
Device Application Development http://nino.net/blog http://www.cinnug.org http://www.avanade.com
3
Why Local store Data store unification Store options What SQL CE Introduction Architecture How Deployment technologies Replication technologies Tools
4
Local store Server store Connectivity-aware Change reconciliation Connected Single data-source Database-driven Occasionally Connected Multiple data sources Data driven
5
Local Store Desktop apps have a local store? Store unification Benefits ▪ Architectural ▪ Data sharing ▪ Co$t Challenges ▪ Architectural ▪ Functional
6
Text file (.txt,.csv,.ini,.xml) Registry (What?!?!) Access FoxPro (R.I.P.) SQL Express Open-source DB Oracle, Sybase
7
SSQL CE SSQL Everywhere SSQL Mobile MMicrosoft SQL Server 2005 Compact Edition 33.1 SSQL CE SSQLce SSSCE
8
Server (1000’s of users) Workgroup (Dozens of users) Desktop (Single User) Laptop Tablet PC Windows CE Device Pocket PC Smart Phone Win 32 SQL Mobile SQL Express SQL Server SQL Server Compact Multi User Single User Scenarios Graphic courtesy Microsoft
9
Fully relational in-process database Win32 + Windows CE Secure OOB Sync Tools support both Developer and DBA Visual Studio ▪ Designer Experience, drag ‘n drop ▪ Server Explorer, Data Sources SQL Server Management Studio ▪ DB design/creation ▪ Interactive query
10
1.4 MB runtime Admin and Non-Admin deployment options Single-file, code-free format (.sdf) In-Proc with the hosting app DOES NOT run as a service Up to 4 gigabytes per database Multi connections for background data operations Simplified security w/password and encryption Transaction (yes, ACID) for batch operations Runs on mainline windows platforms (Windows Mobile/XP/2003) Common programming model through ADO.NET Auto re-use of empty pages Multiple sync options Proven, lightweight, 2-tier, scalable sync API (RDA) Full-featured merge replication Future investments for building occasionally-connected apps
11
CLR (.NET /.NET CF) Client Agent: Replication And RDA OLEDB / Replication API IIS CLIENT SERVER Storage Engine / Replication Tracking Server Agent: Replication and RDA HTTP 802.11b/a/g, CDPD, GSM, GPRS, CDMA, TDMA, etc. Data Provider SQL Server CE Data Provider SQL Server Client Data Provider ADO.NET Visual Studio 2005 (Visual Basic 2005 & C#) Managed Stack TDS Ethernet Well Connected Occasionally Connected OLEDB Visual Studio 2005 (C++) Native Stack OLEDB Provider QP/Cursor Engine SQL Server CE OLEDB SQL Server 2000 SQL Server 2005 Graphic courtesy Microsoft
12
SELECT IMEI, ProductCode, Quantity FROM (SELECT NULL AS IMEI, product AS ProductCode, (physicalqty - allocatedqty) AS Quantity FROM importstock WHERE (NOT mpstype IN(N'U', N'C', N'M', N'X', N'Y', N'P')) AND product IN (SELECT ProductCode FROM (SELECT importstock.product AS ProductCode FROM StockCountSchedule INNER JOIN StockCountProductCategories ON (StockCountSchedule.ID = StockCountProductCategories.ID) INNER JOIN importstock ON (StockCountProductCategories.Product_Type = importstock.product_type) WHERE (StockCountSchedule.IsRecount = 0) AND (StockCountSchedule.ID = 121231) UNION SELECT ProductCode FROM StockCountSchedule INNER JOIN CrossDevice_ProductsToRecount ON (StockCountSchedule.ID = CrossDevice_ProductsToRecount.StockCountID) WHERE (StockCountSchedule.IsRecount = 1) AND (StockCountSchedule.ID = 121231)) AS StockCountProducts) UNION SELECT IMEI.imei AS IMEI, NULL AS ProductCode, NULL AS Quantity FROM importstock INNER JOIN IMEI ON importstock.product = IMEI.product WHERE (mpstype IN(N'U', N'C', N'M', N'X', N'Y', N'P')) AND importstock.product IN (SELECT ProductCode FROM (SELECT StockCountSchedule.ID AS StockCountID, importstock. product AS ProductCode FROM StockCountSchedule INNER JOIN StockCountProductCategories ON (StockCountSchedule.ID = StockCountProductCategories.ID) INNER JOIN importstock ON (StockCountProductCategories.Product_Type = importstock.product_type) WHERE (StockCountSchedule.IsRecount = 0) UNION SELECT StockCountSchedule.ID AS StockCountID, ProductCode FROM StockCountSchedule INNER JOIN CrossDevice_ProductsToRecount ON (StockCountSchedule.ID = CrossDevice_ProductsToRecount.StockCountID) WHERE (StockCountSchedule.IsRecount = 1)) AS StockCountProducts)) AS StockCountItems
13
Merge Replication True bidirectional data reconciliation Fullest-featured synchronization option Remote Data Access Unidirectional change tracking (device) Lightweight option Can be complimentary (like chocolate & peanut butter)
14
Client/server configuration Leveraged by both RDA & MR Client -> ActiveX ▪ SSCE via OLEDB ▪ Communication via HTTP(S) Server -> IIS / ISAPI extension ▪ Handles interaction with SQL Server
15
HTTP (S) OLE DB IIS SQL CE Server Agent SQL Server SQL CE Client Agent SQL CE Database SSCE Engine OLE DB Application SQL Server Provider
16
Server Mobile-aware data ▪ Specific ▪ Easily partitioned (time/date, geo) Filter column indexes Segregate data ▪ R-O vs R-W
17
Device-only change tracking Pull data from server ▪ No calculated columns Push changes Not much change from 3.0 Can now push/pull while db is in use Identity columns still problematic ▪ ALTER TABLE / manage range
18
True synchronization SSCE is the sub ▪ Gets initial snapshot from Server SQL Server is the pub Data changes on both ends reconciled during synchronization ▪ Server-managed, customizable conflict resolution
19
SQL Server 2005 now ‘mobile-aware’ ▪ Download-only tables ▪ Progress notification ▪ Partitioned groups
20
Multi-user access Multiple subscriptions / same db Background sync support Sends only changed columns Synchronization cancellation support Progress updates
21
SSMS Create pub / Define subs VS Define sub Initialize sub / Init sync
22
Sync Framework “Microsoft Sync Framework (MSF) is a comprehensive synchronization platform enabling collaboration and offline for applications, services and devices. Developers can build sync ecosystems that integrate any application, any data from any store using any protocol over any network. MSF features technologies and tools that enable roaming, sharing, and taking data offline.“ http://msdn.microsoft.com/sync http://msdn.microsoft.com/sync
23
Since SQLce will run on the ‘desktop’, can I use it to back-end my ASP.NET website ? No. (but..) AppDomain.CurrentDomain.SetData(“SQLServerEver ywhereUnderWebHosting”,true)
24
Ships with Orcas (VS2008 /.NET (CF) 3.5) Can work w/.NET CF 2.0 & 3.5 90RTM publication compatible subscriber Will work (sync) with Yukon (2005) and Katmai (2008), but not Shiloh (2000) Support Synchronization Services for ADO.NET (desktop) LINQ support
26
VS2005 SP1 SQL Server 2005 SP2 SQL Server 2005 Compact Edition Tools for Visual Studio 2005 SQL Server 2005 Compact Edition Developer SDK SQL Server 2005 Compact Edition Books Online (May 2007) SQL Server 2005 Compact Edition Runtime SQL Server 2005 Compact Edition Server Tools
27
http://www.microsoft.com/sql/editions/compact/default.mspx http://www.microsoft.com/sql/editions/compact/default.mspx http://msdn2.microsoft.com/en-us/sql/bb204609.aspx http://msdn2.microsoft.com/en-us/sql/bb204609.aspx http://www.microsoft.com/technet/prodtechnol/sql/2005/tech nologies/sqlcompact.mspx http://www.microsoft.com/technet/prodtechnol/sql/2005/tech nologies/sqlcompact.mspx http://blogs.msdn.com/SteveLasker http://blogs.msdn.com/SteveLasker http://blogs.msdn.com/SQLServerCompact/ http://blogs.msdn.com/SQLServerCompact/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.