It is always the best practice to design the database and table schemas using an ERD model. After finalizing our schema designs, follow these steps to build our DAO layer:
- Let us open a MySQL workbench or a command line terminal, log in using the username root and password spring5mysql, and create the following schema definition of the hrs database:
- Since we will be dealing with database models, create a package, org.packt.dissect.mvc.model.data, that will contain data models representing the schema of the preceding tables. Given the two tables, create the Employee and Department data models found here:
public class Department ...