INTRODUCING MICROSOFT SQL SERVER COMPACT
Embedded devices typically capture input data from hardware and output processed data back to hardware. For example, a temperature sensor can digitize the temperature, an application or service can make decisions based upon that data as to heating and cooling required, and then output control signals to environment control devices to make temperature adjustments. Data can also be streamed to and from the device over serial and network services. Data will often need to be stored for later use, so a storage mechanism will be used. The data can simply be saved on storage media as a formatted text or binary file or as an XML file. Alternatively, it can be saved as a local file-based database or on a remote database server.
In this chapter Microsoft SQL Server Compact Edition is presented as a method to store, retrieve, and query such data locally. You see how to develop a simple SQL Server Compact database application that makes use of the Visual Studio 2008 Visual Designers. You work through some examples of application data storage using a number of methodologies, leading up to SQL Compact. You cover how to store and load data as a CSV file and as an XML data file. You also use a remote SQL Server for data storage and retrieval and finally do the same using SQL Compact.
Some Data to Store
Start by considering a simple table of data that you can store and load with an application. Consider an application on a device that programmatically plays ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access