I think people must to consider on using Hibernate as their database layer. You will learn knowledge about object oriented paradigm using Hibernate. How every entity in database act as an object that related each other.
This code or this show the most basic CRUD using Hibernate, not using complex relationship, only one entity. For GUI I use my favorite SWT framework. Download and change the extension to .zip. Then extract it and open using Eclipse.
Before run the application edit hibernate.cfg.xml to match your environment.