Can anybody let me know something about hiberante in Java

@anup12 (4177)
India
October 22, 2006 11:14pm CST
What is hibernate in Java
1 person likes this
2 responses
• Singapore
23 Oct 06
Hibernate is an ORM implementation by JBoss (now a division of JBoss). ORM stands for object relation mapping. Its an advancement of ADO or DAO. It allows you to query and obtain the data fro database into Java Object more precisely into JavaBeans. Lets take a scenario. You have a table person(person_id, name, age, fk_addressid) and address(address_id, street, city, zipcode). Now for reading the data from DB, viewing, editing, updatings,etc. you will have to write a lot of SQL and java code. Also you use strings in the the code making the code very hard to understand. In ORM, this relation gets mapped onto java classes like Person:(person_id:int,name:String,age:int,address:Address) and Address:(address_id:int,street:String,city:String,zipCode:int) Since in Java you are working with object, such a framework makes data accessing very easy and streamlined. In fact, in J2EE5, Entity Beans are more or less ORM. Perhaps, javax.persistance package is the standard way to have orm in your application. This ensures that you are able to switch your implementation in future, sice you use standard interfaces. If you need more hands on details, mail me yogendrarampuria/at/gmail/dot/com
• Singapore
23 Oct 06
sorry for typo, JBoss is a division of RedHat.Also,forgot to mention, in ORM you have an entity manager/manager/controller object that gives you the facility for retrieval, updation, insertion and deletion. someting like below: Person p = new Person(); o.setName("Yogendra"); o.setAge(22); EntityManager em = EntityManager.getInstance(); em.persist(o); // This will save the object into database Address a = new Address(); a.setCity("Singapore"); a.setZipCode(123456); a.setStreet("Unknown"); em.persist(a); o.setAddress(a); em.update(o); I hope the answer is upto the mark, neither to technical nor too rookie.
@dundern (246)
• Finland
23 Oct 06
hare is some answers to you guestion but as far as i know it is used for "passive" connecition like on computer when you use hibernate it is "on" but dont use power and when you turn on computer it has all the softwares running and projectes open allready.... but in connections it is called for "hang" means that connections is connected to you computer for so long as you network device is on or you shut off that connection.... this hibernation is used also in java for some viruses. so those are like bears they wake up when a specified tools, program or a requierment is fullfilt... but look on the links links: http://www.onjava.com/pub/a/onjava/2005/11/16/hibernate-for-java-se.html http://en.wikipedia.org/wiki/Hibernate_(Java)ยจ there is answer to you question :) (wishes for best response)