By Zach Skyles Owens
One of the biggest challenges we faced when designing this demo was trying to make the breadth of Microsoft's Data Platform technologies easily understandable in 5 minutes. The major architecture components are SQL Server 2008, SQL Server Data Services (SSDS), SQL Server Compact and Sync; which I outlined in a previous post. We've been following the blogosphere as closely as possible and, understandably so, one of the areas we've seen a bit of confusion around is the type support and conversion between the Entity Data Model, SSDS and SQL Server 2008.
There are a lot of moving parts here so I'll do my best at explaining how everything was integrated and how we got around some of the differences in type support of the data platform technologies.
Bloggers use this application to submit geo-tagged articles and images which are stored in SSDS. We embedded a Virtual Earth control which the users use to manually geo-tag their content. Those who have been following SSDS closely may have noted that SSDS does not currently support blob storage or spatial types.
In this scenario we are also using a Windows Mobile device that allows bloggers to submit photos which are automatically sent to SSDS via the Microsoft Sync Framework. Here are some key points:
Sync from SSDS to SQL Server
Our application uses a powerful WPF desktop application connected to a local SQL Server 2008 database. Since SQL Server 2008 supports Spatial we have the ability to run high performance spatial queries which aren't currently possible in SSDS. FILESTREAM allows us to use the high-performance of the file system for binary file storage along with transactional consistency and great manageability of the database. Type conversion here was very simple and outlined below:
EDM, Spatial and FILESTREAM
Our WPF application uses the Entity Data Model (EDM) to provide the application developers with a more natural business representation of the data. This allows the database model and application data model to evolve independently. Currently the EDM has limited support for FILESTREAM and does not natively support the new SQL Server 2008 Spatial types (GEOGRAPHY and GEOMETRY). These were also very easy to work around in the following ways.
There were definitely some things that we had to consider when building this application but in the end none were major barriers. The application works great and was an enjoyable development experience.