Hibernate Tutorial 01 Object/Relational Mapping | Hibernate Tutorial 01 Object Relational Mapping By Gary Mak hibernatetutorials@ September 2006 1. Installation . Installing JDK JDK is an essential toolkit provided for Java application development. You can go to http j2se to download JDK . Install it into a folder say C . . Installing Eclipse Web Tools Platform WTP Eclipse is an IDE for developing Java application. WTP provides some tools for Web and J2EE development such as XML editor and SQL editor. You can go to http webtools and download WTP All-in-one . Unzip it into a folder say C eclipse . . Installing HSQLDB HSQLDB is an open source SQL relational database engine written in Java. You can go to http and download HSQLDB . Unzip it into a folder say C hsqldb . . Installing DbVisualizer DbVisualizer is a Java-based visual database development tool. You can go to http products dbvis and download DbVisualizer free version. Unzip it into a folder say C 2. Setting up the database Suppose we need to develop an online bookshop application. It will use relational database to store its application data. . Creating a HSQLDB database instance To create a new HSQLDB database instance use the following command. Some files BookShopDB. will be created for the first time running this command. Page 1 of 8 java -cp lib BookShopDB BookShopDB Use DbVisualizer to connect this database using the following properties Driver JDBC HSQLDB Server Database URL jdbc hsqldb hsql localhost BookShopDB Userid sa Password empty . Creating the tables relational model For the first step we create the tables for our online bookshop using the following SQL statements CREATE TABLE PUBLISHER CODE PUBLISHER_NAME ADDRESS PRIMARY KEY CODE VARCHAR 4 VARCHAR 100 VARCHAR 200 NOT NOT NULL NULL CREATE TABLE BOOK ISBN VARCHAR 50 NOT NULL BOOK_NAME