You may have heard the term database used before but might not be completely clear about what a database is or what it is used for. In the simplest terms, a database is a collection of structured information that can be efficiently accessed and modified. Databases contain data and allow four operations to be performed on that data: retrieval, insertion, modification, and deletion. Most commonly, databases are used as a means to retrieve already inserted data. Therefore, we will spend the bulk of our study of databases examining how to retrieve the database's data. Before you can insert, update, delete, or query a database, you must first install the database software, create the database file, and define the structure of the data the database will hold. In this hour we will first examine the basic concepts of a database; after this, we will look at using Microsoft SQL Server 2005 Express Edition, a free database system that you installed along with Visual Web Developer back in Hour 1.
After we've examined the fundamental properties and aspects of a database, we'll turn our attention to the syntax databases use for inserting, updating, deleting, and retrieving data. This language, referred to as Structured Query Language, or SQL, is the topic for the next hour. Following this hour and the next, we'll focus on using various ASP.NET Web controls that are designed to access and display database data. For example, in Hour 14, "Accessing Data with the Data Source Web Controls," we'll examine ASP.NET's DataSource Web controls, which are a set of Web controls used for accessing, updating, inserting, and deleting database data. In Hours 15, "Displaying Data with the Data Web Controls," and 16, "Deleting, Inserting, and Editing Data," we'll see how easy it is to display and modify data using the GridView and DetailsView Web controls. In Hour 17, "Working with Data-Bound DropDownLists, RadioButtons, and CheckBoxes," we'll look at how to populate the contents of DropDownList, RadioButton, and CheckBox Web controls from data residing in a database. (Recall from Hour 11, "Collecting Input Using Drop-Down Lists, Radio Buttons, and Check Boxes," that the DropDownList, RadioButton, and CheckBox Web controls, along with the TextBox Web control, are Web controls designed for collecting user input.) A Look at Current Database SystemsA slew of commercial and free database systems are available that will run on a variety of platforms. Some of the more popular commercial database systems include
These commercial database products are industrial-strength, suited for large companies with demanding data needs. Because these are such high-grade database systems, the costs can be quite high, in the tens of thousands of dollars. Fortunately for us amateur developers, there are also a number of free database systems. These database systems are still impressive software accomplishments, but they lack the features and high performance that the commercial-grade database systems have. However, because we are just using these databases to test our ASP.NET pages, they more than meet our needs. Some of the more popular free databases include
Microsoft SQL Server 2005 Express Edition ships with Visual Web Developer; at this point you have already installed SQL Server 2005 Express Edition. While we'll be using Microsoft SQL Server 2005 Express Edition for all of our database examples through the remainder of this book, don't think that ASP.NET pages can communicate only with Microsoft's own database software products. On the contrary, virtually any database system can be accessed through an ASP.NET page. So, if you or your company is already using a database system other than SQL Server 2005 Express Edition, don't worryyou can still work with that particular system. For the book's examples, though, I encourage you to follow along using SQL Server 2005 Express Edition. |