To see why, examine what you actually need when developing a database-driven Web application. Clear your mind of all of the three-tier and n-tier talk that you’ve heard. Many database-driven Web pages out there are really just beautified database queries. For these Web pages, the requirements are simple: nn SQL for extracting the data nn A way to produce HTML for presentation Creating the SQL is simple. If you don’t already know it, you’ll learn all about it in Chapter 8. The problem is that you have to go from the SQL result set to the HTML markup. In many cases, this is what the entire middle tier in the three-tier model is doing. You start with a result set of some sort, like this: >SELECT ename, job, sal FROM emp WHERE deptno=20 ORDER BY sal; ENAME   JOB              SAL ------- --------- ---------- SMITH   CLERK            800 ADAMS   CLERK           1100 JONES   MANAGER         2975 SCOTT   ANALYST         3000 FORD    ANALYST         3000 This isn’t very palatable for the users, so you want it to look prettier. The results are shown in Figure 1.2. Figure 1.2 Pretty SQL results. 6 Chapter 1 271209 Ch01.F  12/9/02  2:00 PM  Page 6