Use of Hibernate with Java Persistence API

HibernateBefore learning about Persistence technologies, we need to understand what exactly Persistence is in computer science.

Persistence, in simple terms is the ability to retain data structures between various program executions. A perfect example of this would be a word processor saving undo history. In practice, this is achieved by storing the data in non- volatile storage such as a file system or a relational database or an object database.

The popularity of databases has increased manifold in the past few years. Java has become the preferred choice of developers for developing secure, flexible, and scalable database driven web applications. These web applications require objects to be associated with appropriate databases. Hibernate, along with other persistence technologies associate’s objects with the appropriate database in a simple, straight forward and natural way.

Hibernate is one such effort from the Java community to develop many object oriented solutions to data persistence. Any kind of Java persistence solution includes two main elements i.e. ORM (Object Relational Mapping) and OOM (Object Oriented Modeling).

Continue reading “Use of Hibernate with Java Persistence API”

Object Persistence in Java

Introduction

At the time of development, sometimes it is necessary to store the state of the object in the file system. Some objects may or may not be stored in the file system depending upon the structural intensity of the object graph. In this article, I will focus on two major aspects of the object persistence. Before going to this subject, I would like to tell you about the significance of the object persistence. Object persistence presupposes the state of the object in the file system. In this matter you can make argument regarding object persistence in the database, which hibernate does. But so far this article is concerned I will give glimpse on persistence in the file system for all convenience. The state of object signifies the attributes or properties of the object in the broader sense. The object graph represents the internal morphological structure of the object. So persisting object means, you are going to store all the internal changed structure of the object.
Continue reading “Object Persistence in Java”