Is the local database of Windows Phone worth the hassle?

SQL CE on Windows Phone certainly sounds exciting for people who deal with data extensively. Intuitively, one would think he could create a SQL CE database and put it into a Windows Phone app for consumption, simple and easy.  No, to do this involves a lot of work.  This simple scenario is referred to as deploying a reference database with a Windows Phone Application. It requires more than ten steps many of which involve quite some work such as creating and manipulating a helper application which sole purpose is merely generating a database file that can be uploaded to the target Windows Phone app.  Yes, one has to create an application to create a database, instead of using a tool to do it as many would expect.  One can imagine the hassle of database migration and updating with such a scheme.

It is worthwhile to ask the question before jumping into Windows Phone local database: Is it worth the hassle?  The answer may be yes for some cases, but not for many others.

Fortunately, Windows Phone 7 supports Linq to XML.  With such support, one can easily create an XML file to store data and manage it via Linq to XML which is as easy as using SQL to query a database.

This article was updated on 20:49:08 2024-09-24