Knowledge in hibernate in java

What is hibernate ? List the advantages of hibernate over JDBC

Hibernate is used convert object data in JAVA to relational database tables.

Hibernate-Framework In Java

Hibernate - Overview Hibernate is an Object-Relational Mapping (ORM) solution for JAVA. It is an open source persistent framework created by Gavin King in 2001. It is a powerful, high performance Object-Relational Persistence and Query service for any Java Application.Hibernate maps Java classes to database tables and from Java data types to SQL data types and relieves the developer from 95% of common data persistence related programming tasks.Hibernate sits between traditional Java objects and database server to handle all the works in persisting those object based on the appropriate O/R mechanisms and patterns.Hibernate Advantages·       Hibernate takes care of mapping Java classes to database tables using XML files and without writing any line of code.·       Provides simple APIs for storing and retrieving Java objects directly to and from the database.·       If there is change in the database or in any table, then you need to change the XML file properties only.·       Abstracts away the unfamiliar SQL types and provides a way to work around familiar Java Objects.·       Hibernate does not require an application server to operate.·       Manipulates Complex associations of objects of your database.·       Minimizes database access with smart fetching strategies.·       Provides simple querying of data.Supported DatabasesHibernate supports almost all the major RDBMS. Following is a list of few of the database engines supported by Hibernate −HSQL Database EngineDB2/NTMySQLPostgreSQLFrontBaseOracleMicrosoft SQL Server DatabaseSybase SQL ServerInformix Dynamic ServerSupported TechnologiesHibernate supports a variety of other technologies, including −XDoclet SpringJ2EEEclipse plug-insMaven

Hibernate - Architecture

Hibernate - Architecture Hibernate has a layered architecture which helps the user to operate without having to know the underlying APIs. Hibernate makes use of the database and configuration data to provide persistence services (and persistent objects) to the application.Following is a very high-level view of the Hibernate Application Architecture.Following is a detailed view of the Hibernate Application Architecture with its important core classes.Hibernate uses various existing Java APIs, like JDBC, Java Transaction API(JTA), and Java Naming and Directory Interface (JNDI). JDBC provides a rudimentary level of abstraction of functionality common to relational databases, allowing almost any database with a JDBC driver to be supported by Hibernate. JNDI and JTA allow Hibernate to be integrated with J2EE application servers.Following section gives brief description of each of the class objects involved in Hibernate Application Architecture.Configuration ObjectThe Configuration object is the first Hibernate object you create in any Hibernate application. It is usually created only once during application initialization. It represents a configuration or properties file required by the Hibernate.The Configuration object provides two keys components −1)Database Connection − This is handled through one or more configuration files supported by Hibernate. These files are hibernate.properties and hibernate.cfg.xml.2)Class Mapping Setup − This component creates the connection between the Java classes and database tables.SessionFactory ObjectConfiguration object is used to create a SessionFactory object which in turn configures Hibernate for the application using the supplied configuration file and allows for a Session object to be instantiated. The SessionFactory is a thread safe object and used by all the threads of an application.The SessionFactory is a heavyweight object; it is usually created during application start up and kept for later use. You would need one SessionFactory object per database using a separate configuration file. So, if you are using multiple databases, then you would have to create multiple SessionFactory objects.Session ObjectA Session is used to get a physical connection with a database. The Session object is lightweight and designed to be instantiated each time an interaction is needed with the database. Persistent objects are saved and retrieved through a Session object.The session objects should not be kept open for a long time because they are not usually thread safe and they should be created and destroyed them as needed.Transaction ObjectA Transaction represents a unit of work with the database and most of the RDBMS supports transaction functionality. Transactions in Hibernate are handled by an underlying transaction manager and transaction (from JDBC or JTA).This is an optional object and Hibernate applications may choose not to use this interface, instead managing transactions in their own application code.Query ObjectQuery objects use SQL or Hibernate Query Language (HQL) string to retrieve data from the database and create objects. A Query instance is used to bind query parameters, limit the number of results returned by the query, and finally to execute the query.Criteria ObjectCriteria objects are used to create and execute object oriented criteria queries to retrieve objects.

Hibernate- Caching

This clip explains on a topic known as hibernate -cache with diagrams and different types.

Hibernate notes for professionals

This pdf file containing the advance knowledge of the hibernate framework. and this pdf file gives you professional knowledge about hibernating.

Hibernate

complete concept of hibernate