This video tutorial provides you the step-by-step instruction to download the Hibernate framework and create project in Eclipse IDE.
I am assuming that you have already downloaded the Eclipse IDE and installed it on your computer. You are already aware of MySQL database server and having programming experience in developing program-using JDBC. You should have working knowledge of Eclipse IDE also.
Here are the steps of the tutorial:
1. Create the Java Project in Eclipse
2. Download Hibernate Library
3. Add jar files of hibernate
4. Add MySQL JDBC Driver file
5. Create MySQL Database and Table
6. Create the Persistent class with mapping information
7. Create the Hibernate Configuration file
8. Create Utility class for initializing the SessionFactory
9. Create Example code to load the data from Database
10. Run the Example
Here is the video tutorial of "How to create Hibernate Project in Eclipse?":
Here is the query to create table:
CREATE TABLE `employee` ( `id` int(11) NOT NULL AUTO_INCREMENT, `emp_name` varchar(100) DEFAULT NULL, `emp_address` varchar(500) DEFAULT NULL, `emp_mobile_nos` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) );
Here is the sql to insert the data into table:
insert into employee values(1,'Deepak Kumar','Delhi','00000'); insert into employee values(2,'Ravi','Delhi','00000');
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: July 22, 2015 If you enjoyed this post then why not add us on Google+? Add us to your Circles