Datasheet

Chapter 1
14
XML is a powerful way of representing information, but in some circumstances performance can be a
problem: updating and retrieving data from XML can be a time-consuming process. This is rarely an
issue when a few users are accessing a small amount of data, but if there's a lot of data (or a lot of users)
it can sometimes become one.
Other Sources
Between them, the three options enumerated above cover the main categories of data store, but there
are many others that either fall between these, or follow a completely different paradigm. Most of the
types that we haven't covered, though, are domain-specific – that is, that they've been developed to suit
a specific task. On the Windows platform, typical examples of these include:
Microsoft Exchange Server – the data store containing e-mail, calendar, and contact information
Active Directory – the information that's stored by Windows-based servers regarding the users
on the system, their permissions, etc.
Spreadsheets – applications such as Excel store their data in a tabular format, a grid containing
values that are used in tasks such as financial calculations.
In summary, although this book is focusing on databases (and uses them in the majority of its examples),
it is important to remember that databases are not the only kind of data store, and that other
mechanisms for storing data can often achieve the same goal more efficiently.
Retrieving Data from a Database
Regardless of the data store involved, there are three steps to using it that will be common to almost
every web application you write. You need to 'connect' to the data source; you need to read the data
(and possibly convert it or otherwise perform operations upon it); and you need to display the results.
Before we begin to delve into the way that .NET deals with handling data, we'll elaborate on these three
topics in a more general way, as a quick heads-up on how data-driven sites function.