I am reading https://www.mkyong.com/hibernate/how-to-generate-code-with-hibernate-tools/. It explains how to first create a database, and then to automatically create a Hibernate mapping and Java classes that match the tables in the database by using JBoss plugin in Eclipse.
I was wondering how to do the reverse automatically. Specifically, if I have created java classes, then how shall I create the database automatically? Do I need to manually create the database first, if it doesn't exist already? Do I need to manually create the tables in the database first, if they don't exist already? Thanks.
Note that If I am correct, this is how to do that manually instead. First add annotation or a hbm.xml file for the mapping, and then create the database and then create the tables in the database corresponding to the Java classses.