Understanding Data Management
Almost every piece of software ever written works with data. In fact, a typical web application is often just a thin user interface shell on top of sophisticated data-driven code that reads and writes information from a database. Often, website users aren’t aware (or don’t care) that the displayed information originates from a database. They just want to be able to search your product catalog, place an order, or check their payment records.
The Role of the Database The most common way to manage data is to use a database. Database technology is particularly useful for business software, which typically requires sets of related information. For example, a typical database for a sales program consists of a list of customers, a list of products, and a list of sales that draws on information from the other two tables. This type of information is best described using a relational model, which is the philosophy that underlies all modern database products, including SQL Server, Oracle, and even Microsoft Access.
As you probably know, a relational model breaks information down to its smallest and most concise units. For example, a sales record doesn’t store all the information about the products that were sold. Instead, it stores just a product ID that refers to a full record in a product table.
Although it’s technically possible to organize data into tables and store it on the hard drive in one or more files (perhaps using a standard like XML), this approach wouldn’t be very flexible. Instead, a web application needs a full relational database management system (RDBMS), such as SQL Server. The RDBMS handles the data infrastructure, ensuring optimum performance and reliability. For example, the RDBMS takes the responsibility of providing
data to multiple users simultaneously, disallowing invalid data, and ommitting groups of actions at once using transactions.
In most ASP.NET applications, you’ll need to use a database for some tasks. Here are some basic examples of data at work in a web application:
• E-commerce sites (like Amazon) use detailed databases to store product catalogs. They also track orders, customers, shipment records, and inventory information in a huge arrangement of related tables.
• Search engines (like Google) use databases to store indexes of page URLs, links, and keywords.
• Knowledge bases (like Microsoft Support) use less structured databases that store vast quantities of information or links to various documents and resources.
• Media sites (like The New York Times) store their articles in databases.