11.6. Summary

The ability to work with databases is a good addition to your set of web development skills. Most of today's modern dynamic web sites use a database, so it's important to understand how to work with them.

Although databases come in many different forms, including flat-file, object-relational, and object-oriented databases, the relational database is the most popular form of databases used today. Microsoft SQL Server is a relational database and naturally blends in with the ASP.NET programming environment, making it easy to retrieve and manipulate data that is stored in the database. Because SQL Server 2005 Express Edition ships with Visual Web Developer 2008 for free and because this database can be upgraded easily to the full and commercial versions of SQL Server, this database is the natural choice for your ASP.NET 3.5 web sites.

To access and manipulate data in a relational database, you use a language called Structured Query Language, SQL for short. Among other elements, this language defines four important keywords that allow you to perform CRUD — Create Read Update Delete — operations against a database.

The SELECT statement allows you to retrieve data from one or more tables. To access more than one table you can use one of the available JOIN types to define a relationship between the tables. To limit the number of records returned by a query, you can use a WHERE clause. To order the items in the result set returned by your query, you use the ORDER BY clause. ...

Get Beginning ASP.NET 3.5: In C# and VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.