Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Hibernate uses an XML document to track the mapping between Java classes and relational database tables. This mapping document is designed to be readable and hand-editable. You can also start by using graphical CASE tools (like Together (http://www.borland.com/us/products/together/index.html), Rose (http://www-306.ibm.com/software/awdtools/developer/technical/), or Poseidon (http://gentleware.com/index.php)) to build UML diagrams representing your data model and feed these into AndroMDA (http://www.andromda.org/), turning them into Hibernate mappings. The Hibernate Tools package you downloaded earlier also gives you several of these capabilities if you are working with it in Eclipse.
Here, we’ll write an XML document by hand, showing it’s quite practical. Let's start by creating a mapping for tracks, pieces of music that can be listened to individually, or as part of an album or playlist. To begin with, we’ll keep track of the track’s title, the path to the file containing the actual music, its playing time, the date on which it was added to the database, and the volume at which it should be played (in case the default volume isn’t appropriate because it was recorded at a very different level than other music in the database).