In this recipe, we will learn how to create and populate the Patient and a Medication table. These tables will be used for the other recipes in this chapter. This approach means you do not have to import or otherwise use an existing database. The process of creating these tables is facilitated through several helper methods. Upon completion of this recipe, you will have the base for learning how to use JPQL as illustrated in the remaining recipes.
The process of creating this application consists of:
PatientAn entity representing a patient
MedicationAn entity representing the medications used by a patient
AbstractFacadeA base class used by the next two classes