O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Product Class

Now that you have customers, it would be nice if they could buy something. For that, you need the products. Again, the Books for Geeks folks have no doubt supplied you with the product data: title, author(s), ISBN, price, and descriptive text. But there is also hierarchical information in the form of categories that you need to model. This is shown in Figure 5.5.

Figure 5.5. Products and categories.

One question that the client has not yet been asked and that now needs to be posed is this: Can a product live in more than one category? The answer, in this case, is yes. For example, a book like this that deals with Java, Web sites, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required