Chapter 11. Introduction to Databases

Being able to use a database in your ASP.NET 3.5 web sites is just as critical as understanding HTML and CSS: it's almost impossible to build a modern, full-featured web site without it. Databases are useful because they allow you to store data in a structured way and enable you to retrieve that data in a structured way again. The biggest benefit of databases is that they can be accessed at runtime, which means you are no longer limited to just the relatively static files you create at design time in Visual Web Developer. You can use a database to store reviews, musical genres, pictures, information about users (user names, e-mail addresses, passwords, and so on), log information about who reads your reviews, and much more, and then access that data from your ASPX pages.

This gives you great flexibility in the data you present, and the way you present it, enabling you to create highly dynamic web sites that can adapt to your visitor's preferences, to the content your site has to offer, or even to the roles or access rights that your users have.

To successfully work with a database in an ASPX page, this chapter teaches you how to access databases using a query language called SQL — or Structured Query Language. This language allows you to retrieve and manipulate data stored in a database. You will also see how to use the database tools in VWD to create tables and queries.

Although ASP.NET and the .NET Framework offer you many tools and technologies ...

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.