Saturday, November 25, 2006

Orcas December 2006 CTP Coming with New LINQ/EDM Bits

Visual Studio Orcas CTPs will replace ADO.NET vNext CTP drops starting with the Orcas December 2006 CTP. Charlie Calvert, Microsoft's Community Program Manager for the C# group, reports in his November 21, 2006 Community Convergence XII post:

The Orcas December CTP will contain new LINQ bits. The team has been churning out daily builds filled with new LINQ content. Over the next weeks it will all come together in a CTP that will be released to the public. This will be the first major update to the LINQ bits since the May CTP. The first Orcas beta is not due until 2007.
Charlie's post follows ADO.NET Technical Lead Pablo Castro's November 7, 2006 ADO.NET Orcas and Samples item:

As we make progress on the Orcas release of Visual Studio, the various teams—including ourselves—are working hard at integrating everything in a single product, Visual Studio Orcas. For the ADO.NET Entity Framework this means that you won’t see component-specific CTPs any more for Orcas, and instead you’ll see Orcas CTPs that have all these technologies incorporated. We may still do separate CTPs of related technologies if we see that it would help at some point in time.

Also, since the ADO.NET Entity Framework is in the Orcas builds, we don’t need the generic “vNext” token for it; from now on we’ll refer to it simply as ADO.NET Orcas, which will include the ADO.NET Entity Framework and LINQ to ADO.NET in its various flavors (LINQ to DataSet, LINQ to SQL and LINQ to Entities).

The December CTP release undoubtedly will integrate updated versions of the the ADO.NET Entity Framework from the October 2006 Orcas CTP and its sample code plus the the August 2006 ADO.NET vNext CTP's Entity Data Model (EDM) designer prototype.


Here's the latest (December 8, 2006) update on the Orcas December CTP 2006 release from the Visual C# Community Center:
The December Orcas CTP will be released soon. This CTP will be a regular install, and will not ship inside a Virtual Machine. It will co-exist with Visual Studio 2005. The main feature in the CTP will be the ability to work with LINQ. These will be the first new LINQ bits we have seen since the May CTP. The December CTP is a pre-beta release. The Orcas Beta is not expected until sometime in 2007. The team is also near the release of Service Pack 1 for Visual Studio 2005. Right now, I'm still exploring this issue, but I've heard that the order in which we install Service Pack 1 and the LINQ May CTP may be important. The reports I'm hearing at this time suggest that we should install the service pack first, and then the May CTP. I should have more information on this issue by the end of the week.

I believe Charlie meant "December CTP" where he mentions "May CTP" in the preceding paragraph.


Charlie has posted the first four five installments of The LINQ Farm, a series of articles for beginning LINQ C# programmers:

  1. LINQ for Beginners (10/29/2006)
  2. Query Expressions (10/31/2006)
  3. Query Operators (11/11/2006)
  4. Using Distinct and Avoiding Lambdas (11/19/2006)
  5. Focus on Grouping (12/2/2006)

He avoids deep discussions of lambdas, which makes the articles useful for VB developers also. Charlie points to a video and some recent articles of interest to LINQ and ADO.NET EF developers:

Here are a few links to recent Channel9 videos that might interest LINQ developers:

Updated: 12/7/2006 with Charlie Calvert's fifth episode of the LINQ Farm: Focus on Grouping. 12/8/2006 for potential Orcas issues with VS 2005 SP1.

Technorati Tags: Orcas, ADO.NET vNext, Entity Framework, Entity Data Model, LINQ, LINQ to Entities, LINQ to DataSets, LINQ to SQL, Entity SQL, eSQL, DLinq, XLinq, C# 3.0, VB 9.0, ObjectSpaces, Domain-Specific Languages, DSL, DSL Tools

Wednesday, November 15, 2006

Microsoft Offers SQL Server 2005 SP2 CTP

Microsoft announced on November 7, 2006 the availability of a Communtity Technical Preview (CTP) of the forthcoming SQL Server 2005 Service Pack 2 for all editions except Express, and special SP2 CTPs for the Express edition (SQLX) and Express with Advanced Features. SP2 will be required to run any version of SQL Server under Windows Vista and "Longhorn" Server. The "What's New in SQL Server 2005 SP2" page summarizes upgrades to:

  • Analysis Services
  • Database Engine
  • Integration Services
  • Reporting Services and
  • SharedTools
for editions that incorporate the features. Download the appropriate SP2 CTP bits from the SQL Server Community Technology Preview Program page. Microsoft senior vice president of Data and Storage Platforms Paul Flessner expanded on the preceding list during his keynote speech at the 2006 Professional Association for SQL Server (PASS) Community Summit in Seattle on November 15, 2006. Added features include:
  • Data compression
  • Increased business intelligence functionality
  • Security updates relating to Common Criteria
  • Manageability enhancements
  • Support for Windows Vista and
  • Optimization for use in the 2007 Microsoft Office system environment
Microsoft is pursuing Common Criteria security certification for SQL Server 2005 Enterprise Edition SP1 and SP2. Many governments require Common Criteria certification and it's a preference or requirement for many industries. In the meantime, Microsoft has made available Enterprise Strategy Group (ESG) reports on SQL Server 2005 security—Microsoft SQL Server Runs the Security Table and The Security Development Lifecycle (SDL). Advantage, Microsoft. According to ESG, "Microsoft SQL Server 2005 is particularly worth examining as it is the first major product release that Microsoft has put through the SDL." Flessner also announced that Visual Studio Team Edition for Database Professionals (formerly code-named "DataDude") is set to RTM on November 30, 2006.

Updated: 11/16/2006 with additional security data.

Technorati tags: , , , , , , ,

Thursday, November 09, 2006

ADO.NET Sync Framework for Occasionally Connected Systems

WiFi Internet connectivity is becoming ubiquitous in first-world urban areas, but there are classes of data collection/management applications that must be operable during wired and/or wireless network outages—emergency and health services, for example—or exhibit dramatically decreased user productivity without a live network connection—field sales workers come to mind. Some occupations are inherently occasionally connected: governmental, academic, and corporate field workers in rural locations; land surveyors; forest rangers; environmental scientists; marine biologists and the like. Seldom, occasionally, and usually-connected users need the ability to cache data locally and synchronize local data with large back-end databases. The preferred caching and synchronization model is Outlook 2003/2007, where clients always work with their local data store and the server only propagates data changes to the client. Following are the most common methods of client-side caching and synchronization:

  • ADO.NET Datasets persisted as XML files
  • Remote Data Access (RDA) for SQL Mobile/SQLce databases
  • Merge replication to SQL Server 2005 (not Express)
  • Occasionally Connected Systems (OCS)Sync Framework (future)
ADO.NET Datasets Microsoft's developers designed ADO.NET Datasets to support data management applications for usually, occasionally, or seldom-connected mobile users. Datasets persist dynamic (read/write) and a subset of catalog (read-only, slowly changing) relational data in XML files. Datasets replace combinations of merge and snapshot replication with a lighter-weight, XML file-based system that uses DataAdapters to communicate with back-end RDBMSes. I described disk and RAM resource consumption issues with large ADO.NET 1.1 and 2.0 Datasets in my May 2004 "Store Large Lookup Tables in DataSets" article for Visual Studio Magazine (reading page 2 requires free registration.) The article's Table 1 shows the time to load Datasets of various sizes from XML files Although multi-MB Datasets are practical for today's laptop, tablet, and ultra-mobile (portable) PCs, their resource consumption precludes use on Windows CE, PocketPC, SmartPhone, and similar devices. Single-file relational databases, such as SQL Server 2005 Compact Edition (SQLce), are better suited than Datasets for portable PCs and devices when data storage requirements exceed a few MB. Remote Data Access RDA is the basic application for synchronizing data between SQL Server Mobile or, more recently, SQLce—formerly called SQL Server Everywhere (SQLEv). RDA pulls data from a remote SQL Server 2000 or 2005 table to a client's SQLce table. The SQLce database keeps track of changes changes to the pulled data and, on demand, pushes the changes to the back-end server. RDA also can execute CRUD (CREATE, RETRIEVE, UPDATE, and DELETE) operations on the remote server with Transact-SQL (T-SQL) statements. SQL Server doesn't push changes in its data to SQLce; thus, RDA is a one-way replication technology.

RDA connects to the back-end database with the HTTP or HTTPS protocols to Internet Information Services (IIS) on the server and pass compressed data through firewalls. Custom C#/VB code or the Connection Manager application handles the details of the connection. RDA is the only method of replicating data between SQL Server 2005 Express (SQLX) and SQLce, because SQLX (unlike MSDE 2000) isn't a merge replication publisher. RDA can detect but doesn't handle concurrency or referential integrity conflicts, and schema changes aren't allowed.

Merge Replication Replication is the traditional means of updating data between SQL Server instances, and merge replication is the most common type. Merge replication uses a different Connection Manager to handle communication with the back-end database using HTTP or HTTPS protocols to pass compressed data through firewalls. Merge replication is two-way, supports referential integrity, handles concurrency conflicts, and allows schema changes. Merge replication, including subscription and publication, is a heavyweight process compared to RDA push/pull operations, but is quite reliable. OCS Sync Framework The OCS Sync Framework involves a SyncAgent on the client that uses a SyncTable to manage a ClientSyncProvider for each type of local store, such as SQLce or SQLX. Server-side components include a ServerSyncProvider, SyncGroup, SyncAdapter, and SyncAdapter commands. The SyncAdapter and SyncAdapter commands (DBCommand objects) are ADO.NET database-agnostic objects so synchronization can occur with SQL Server, Oracle, IBM DB2 or any other RDBMSes that have an .NET native data provider. IncrementalInserts, IncrementalUpdates and IncrementalDeletes enable clients to request the server to update catalog data. The client and server can push changes directly with SQL Server TDS or another RDBMS's wire protocol when a physical network connection is available. Otherwise the client can push and pull changes with a proxy that connects to a service. Synchronization methods can be:
  • Pull only from server (unidirectional)
  • Push only to server (unidirectional)
  • Push and pull (bidirectional)
  • Snapshot (no synchronization)

The OCS Sync Framework appears to fall midway between the lightweight RDA and heavyweight merge replication method in operational complexity and resource consumption, but the current (very early) implementation requires a substantial amount of client code to specify synchronization type and SQL statements for DBCommands.

Live From Redmond: Smart Client: Offline Data Synchronization and Caching for Smart Clients is Steve Lasker's 94-minute Webcast that covers Dataset, RDA, merge replication, SQL Query Notifications, and a preview of the OCS Sync Framework (requires free registration). Steve is a Microsoft program manager/technical lead and informal evangelist for OCS, Windows forms, VB .NET, and ADO.NET Datasets. Steve also delivered a more general Live From Redmond: Visual Studio: Developing Local and Mobile Data Solutions with SQL Server Compact Edition Webcast on December 4. Steve also offers an Occasionally Connected Systems slide deck and a screencast that demonstrates how the OCS Sync Framework operates and VB WinForm code to synchronize a client with SQL Server. Most public OCS-related information presently comes from Steve's blog. His "Tech Ed 06 Slides and Demos on SQL Server Everywhere Edition" post has links to DEV351: Developing Local and Mobile Data Solutions with SQL Server Everywhere Edition and DEV343: Offline Data Synchronization and Caching with SQL Server Everywhere Edition.

Update: 12/9/2006: 12/4/2006 Webcast name updated.

Technorati tags: , , , , , , , , , , , , ,

Wednesday, November 08, 2006

SQL Server 2005 Compact Edition RC1 Available

Microsoft accounced on November 7, 2006 the availability of SQL Server [2005] Compact Edition (SQLce) 3.1 Release Candidate 1 (RC1). SQLce—formerly named SQL Server Everywhere Edition (SQLEv) 3.1—is a lightweight, in-process cousin of SQL Server 2005 and SQL Server 2005 Express. SQLce is the successor to earlier SQL Server Mobile 3.0 and SQL CE 2.0 and 1.0 editions. You can download the SQLce RC1 runtime and readme, as well as SQLce RC1 Books Online. SQLce is an embeddable, small-footprint, single-user database for mobile and desktop applications. As an example, you can substitute SQLce for SQL Server 2005 Express (SQLX) when you need local storage for usually, occasionally or seldom-connected systems. SQLce uses the ADO.NET programming model, supports most SQL Server 2005 data types and T-SQL reserved words, and is freely distributable.

According to the "Microsoft SQL Server 2005 Compact Edition Overview" white paper, SQLce:

  • Occupies only 1.8 MB of disk space
  • Supports single-file databases up to 4 GB in size
  • Uses 128-bit SSL for secure and reliable functionality, even through firewalls
  • Uses 128-bit RSA file-based encryption on devices for database file security
  • Provides an encrypted data format with password protection
  • Will use the ADO.NET Sync Framework in Visual Studio vNext ("Orcas")

A separate OakLeaf blog post, "ADO.NET Sync Framework for Occasionally Connected Systems" has the details on Microsoft's new approach to SQLce synchronization that's coming in Orcas.

I wrote about Mobile Edition's morph to Everywhere Edition in my May 1, 2006 "SQL Server 2005 Mobile Edition Goes Everywhere" article for Fawcette Technical Publications Online's "Special Report: SQL Server." "SQL Everywhere" had a "déjà vu all over again" ring to me. It appears that I wasn't the only one non-plussed about the "Everywhere" suffix, which appeared to me to encroach on Sybase's SQL Anywhere trademark for a similar database product. Sybase also claims here that SQL Everywhere is their trademark. Here's what Microsoft has to say about renaming SQLEv to SQLce:

SQL Server 2005 Compact Edition, was previously named SQL Server 2005 Everywhere Edition during the product development phase. Customers have communicated to Microsoft through the pre-release community technology preview (CTP) program and other channels that this product name may cause potential confusion with other database product names in the industry. Microsoft has taken this feedback seriously and has accordingly changed the official product name.
Of course, this isn't the first time that Microsoft has done an about-face on product and architecture names. Remember .NET Everything? Steve Lasker's "SQL Server Everywhere Gets a New Name" post has more to say about the name change and SQLce's features in the forthcoming RTM bits. Steve is a Microsoft program manager/technical lead for Occasionally Connected Systems (OCS) and the forthcoming ADO.NET Sync Framework. Steve's Live From Redmond: Visual Studio: Developing Local and Mobile Data Solutions with SQL Server Compact Edition December 4, 2006 Webcast provides a detailed overview of SQLce's capabilities. His presentation includes a substantial amount of VB (!) ADO.NET code. (Free registration required.) Several comments about the post complain about SQLce's 4 GB size limit, which is a significant problem for local document storage. In a reply to a comment by John, Steve says, "Again, the current 4gb limit is purely a device optimization that we will definitely remove now that we’re running on larger desktop scenarios. ... The 4gb limit isn’t a 'free' restriction as we’ve done with Express." Microsoft's product page for SQLce hadn't been updated from SQLEv to SQLce terminology when this post was written. If you're working with the SQLEv CTP on devices, you can download the CTP for SQLEE Access Database Synchronizer to synchronize data between Access 2000 - 2007 databases and SQLEv CTP or SQLce RC1. There's more information on all these topic, plus details for the Microsoft SQL Server 2005 Compact Edition Tools for Visual Studio SP1 Beta, which Microsoft says updates the VS 2005 SP1 Beta smart device development components with the design time environment for SQLce, at the SQL Server Everywhere Edition [sic] blog. The SQLce newsgroup is here.

Updated 11/9/2006 with additional details about and links to SQLce, SQLEv, OCS and Sync Framework topics. 12/9/2006: Added 12/4/2006 Webcast link.

Technorati tags: , , , , , , , , , , , , ,

Wednesday, November 01, 2006

Objectify Data with ADO.NET vNext

The "Objectify Data with ADO.NET vNext" article from the October 2006 issue of Visual Studio Magazine explains how the ADO.NET vNext August 2006 Community Technical Preview reincarnates ObjectSpaces’ object/relational mapping (O/RM) technology and OPath query language as the Entity Framework (EF), Entity Data Model (EDM), Entity SQL (eSQL), and LINQ to Entities for the Visual Studio “Orcas” release. Here's a screen capture of the article's VB 9.0 sample test harness: The article's AdventureWorks SalesPersons bonus project (AWv3TestApp.sln) invokes the AdventureWorksV3 EDM class library to populate a DataGridView with records for sales personnel who are eligible for bonuses—five years employment by AW for this example. Clicking the Add or Deduct buttons increcments or decrements bonuses, persists the changes, and refreshes the grid. If you're interested in learning more about the ADO.NET team's new approach to O/RM check out these previous OakLeaf posts:

Click here for a page of links to earlier posts about LINQ, LINQ to SQL (DLinq), and LINQ to XML (XLinq)

Technorati Tags: ADO.NET vNext, Entity Framework, Entity Data Model, LINQ, LINQ to Entities, LINQ to DataSets, LINQ to SQL, Entity SQL, eSQL, DLinq, XLinq, C# 3.0, VB 9.0, Orcas, ObjectSpaces, Domain-Specific Languages, DSL, DSL Tools