A complete list of deprecated HTML tags and attributes are given
here. All the tags have been ordered alphabetically along with their
equivalent tag or alternate CSS option.
পৃষ্ঠাসমূহ
Labels
Search Your Article
CS
Pageviews
Showing posts with label Hibernate Tutorial. Show all posts
Showing posts with label Hibernate Tutorial. Show all posts
Wednesday, February 22, 2017
Monday, January 16, 2017
Hibernate - Overview
Hibernate is an Object-Relational Mapping(ORM) solution for JAVA and
it raised as 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 - Architecture
The Hibernate architecture is layered to keep you isolated from
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.
Hibernate - Environment
This chapter will explain how to install Hibernate and other
associated packages to prepare a develop environment for the Hibernate
applications. We will work with MySQL database to experiment with
Hibernate examples, so make sure you already have setup for MySQL
database. For a more detail on MySQL you can check our MySQL Tutorial.
Hibernate - Configuration
Hibernate requires to know in advance where to find the mapping
information that defines how your Java classes relate to the database
tables. Hibernate also requires a set of configuration settings related
to database and other related parameters.
Hibernate - Sessions
A 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.
Hibernate - Persistent Class
The entire concept of Hibernate is to take the values from Java class
attributes and persist them to a database table. A mapping document
helps Hibernate in determining how to pull the values from the classes
and map them with table and associated fields.
Hibernate - Mapping Files
An Object/relational mappings are usually defined in an XML document.
This mapping file instructs Hibernate how to map the defined class or
classes to the database tables.
Hibernate - Mapping Types
When you prepare a Hibernate mapping document, we have seen that you map Java data types into RDBMS data types. The types
declared and used in the mapping files are not Java data types; they
are not SQL database types either. These types are called Hibernate
mapping types, which can translate from Java to SQL data types and vice
versa.
Hibernate - Examples
Let us try an example of using Hibernate to provide Java persistence
in a standalone application. We will go through different steps involved
in creating Java Application using Hibernate technology.
Hibernate - O/R Mappings
So far we have seen very basic O/R mapping using hibernate but there
are three most important mapping topics which we have to learn in
detail. These are the mapping of collections, the mapping of
associations between entity classes and Component Mappings.
Hibernate - Annotations
So far you have seen how Hibernate uses XML mapping file for the
transformation of data from POJO to database tables and vice versa.
Hibernate annotations is the newest way to define mappings without a use
of XML file.
Hibernate - Query Language
Hibernate Query Language (HQL) is an object-oriented query language,
similar to SQL, but instead of operating on tables and columns, HQL
works with persistent objects and their properties. HQL queries are
translated by Hibernate into conventional SQL queries which in turns
perform action on database.
Hibernate - Criteria Queries
Hibernate provides alternate ways of manipulating objects and in turn
data available in RDBMS tables. One of the methods is Criteria API
which allows you to build up a criteria query object programmatically
where you can apply filtration rules and logical conditions.
Hibernate - Native SQL
You can use native SQL to express database queries if you want to
utilize database-specific features such as query hints or the CONNECT
keyword in Oracle. Hibernate 3.x allows you to specify handwritten SQL,
including stored procedures, for all create, update, delete, and load
operations.
Hibernate - Caching
Caching is all about application performance optimization and it sits
between your application and the database to avoid the number of
database hits as many as possible to give a better performance for
performance critical applications.
Hibernate - Batch Processing
Consider a situation when you need to upload a large number of
records into your database using Hibernate. Following is the code
snippet to achieve this using Hibernate:
Session session = SessionFactory.openSession();
Hibernate - Interceptors
As you have learnt that in Hibernate, an object will be created and
persisted. Once the object has been changed, it must be saved back to
the database. This process continues until the next time the object is
needed, and it will be loaded from the persistent store.
Discuss Hibernate
Hibernate is a high-performance Object/Relational persistence and
query service which is licensed under the open source GNU Lesser General
Public License (LGPL) and is free to download. Hibernate not only takes
care of the mapping from Java classes to database tables (and from Java
data types to SQL data types), but also provides data query and
retrieval facilities. This tutorial will teach you how to use Hibernate
to develop your database based web applications in simple and easy
steps.
Hibernate - Useful Resources
The following resources contain additional information on Hibernate.
Please use them to get more in-depth knowledge on this topic.
Subscribe to:
Posts (Atom)