Chapter 6. Database Reuse

In Chapter 5, we discussed how to use code reuse mechanisms to build versatile form-creation and form-validation classes. In this chapter, we will look at how to build reusable database classes. As with the previous chapter, we will begin by examining database usage from a high level and look at how to accomplish various database-related tasks using standard, procedural code. Finally, we’ll convert these various procedural scripts into a robust set of classes, prime for reuse!

I think you’ll find the code presented and the topics discussed in this chapter to be extremely applicable. Database access is common among ASP web sites, and any steps that can be taken to reduce the time needed to create new database interface pages are steps in the right direction. However, presenting such a large and advanced application requires a great deal of time and explanation. This chapter is, by far, the longest in this book. It will most likely take you a long while to work through this chapter. If you stick with it, though, your fortitude will pay dividends, since the application presented in this chapter is very useful in the real world.

It is assumed that you are knowledgeable in relational database design and theory. If you are unfamiliar with the SQL syntax, or have never created a relational data model, it is strongly suggested that you become more familiar with these topics before beginning on this chapter.

Examining Database Usage

As discussed in Chapter 5, there ...

Get Designing Active Server Pages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.