The CUSTOMERDB database
Our examples in this chapter use a database called CUSTOMERDB
. This database contains tables to track customers and order information for a fictitious store. For simplicity, the database uses an in-memory H2 database.
A simple utility that automatically starts the database and populates all reference tables is included with this book’s example code. The utility can be found under ch08_src/customerdb
. It is a Maven application. Therefore, it can be built from the command line via mvn install
. It creates an executable JAR file with all dependencies included. The created JAR file can be found under the target
directory, it can be run from the command line by issuing the following command:
java -jar customerdb-jar-with-dependencies.jar
The schema for the CUSTOMERDB
database is depicted in Figure 8.1.
Figure 8.1 – CUSTOMERDB database schema (The intent of this schema is to show the layout; the readability of the text in...