Java program to demonstrate the use of creating two tables out of one class that maintains referential integrity in Hibernate