As cars are prepared for sale, they are added to the ST_CARS_FOR_SALE table (see Figure 8.5). This object tracks the inventory ID, the description of the car, and the location of the picture image on disk. HTML output can pick up images from only the disk, so all you need to do is store the location of the image in the database, not necessarily the whole picture. If the picture is stored in the database, the get_lob PL/SQL built-in procedure can be used to extract it to a specific location with a specific name, which can then be referenced by the HTML output. An additional Oracle form could be added to maintain the ST_CARS_FOR_SALES, and of course, a report or form would be needed to display or process the BUYER information when offers are made.
The Sales Tracking Web site dynamically displays auto information on those vehicles that have been added to the ST_CARS_FOR_SALE table object. Figure 8.6 shows the 1992 Camry Deluxe auto information that is in the ST_CARS_FOR_SALE object. This is the information that will be pulled from the database to be displayed on the actual Web site.
The Web site will then be capable of displaying information stored in this table object. Figure 8.7 shows the Web site that will be built in Chapters 9, “Using PL/SQL to Build Web Sites,” and 10, “Using Java to Build Web Sites.”
Three buttons control the navigation of this Web page: Previous, Next, and Buy This Car (shown in the main screen in the upper-left window). The Previous and Next buttons display information from the previous or next row in the ST_CARS_FOR_SALE object. For example, clicking the Next button displays the Camry information as illustrated in the upper-right window. If you click the Place Offer button here, you then see the entry boxes displayed on the Web page in the bottom-left window. After you enter the offer information and click Place Offer, you will see the summary information displayed as in the bottom-right window. The Browse Inventory button in this panel then returns the Web user back to the original screen, as seen in the upper left.
Figure 8.8 shows the data stored in ST_CARS_FOR_SALE after the Place Offer button has been clicked. This shows the information from the Web page has been written into the database.
NOTE
This is a sample application. A real application that takes offers over the Web would collect as many offers as possible, storing them in yet another table object. The author is interested in showing functionality in these examples.