Examples in this chapter will use a database called CUSTOMERDB
. This database contains tables to track customer and order information for a fictitious store. The database uses JavaDB for its RDBMS, since it comes bundled with GlassFish, but it can be easily adapted to any other RDBMS.
A script is included with this book's code download to create this database and pre-populate some of its tables. Instructions on how to execute the script, and add a connection pool and data source to access it are included in the download as well.
The schema for the CUSTOMERDB
database is depicted in the following diagram:
As can be seen in the diagram, the database contains tables to store customer information such as name, address, and email address. It also contains tables to store order and item information.
The ADDRESS_TYPES
table will store values such as "Home", "Mailing", and "Shipping", to distinguish the type of address in the ADDRESSES
table; similarly, the TELEPHONE_TYPES
table...