Java Data Persistence Technologies: Research Report and Analysis
VerifiedAdded on 2022/10/04
|19
|3029
|167
Report
AI Summary
This report provides a comprehensive overview of Java data persistence technologies. It begins by defining data persistence and its importance in enterprise information systems. The report then delves into four key Java persistence technologies: Java serialization, Java Database Connectivity (JDBC), Java Data Objects (JDO), and Java Persistence APIs (JPA). It describes each technology's advantages, disadvantages, architecture, and provides code examples where appropriate. The report examines Java serialization's role in converting object states to byte streams, the functionality of JDBC for database connections, JDO's role in enabling transparent persistence of Java objects, and JPA's specification for managing relational data through object-relational mapping. The report highlights the evolution and advantages of each technology, including their specific use cases and limitations, offering a detailed analysis of their architectures and applications. The report concludes with a discussion of the advantages and disadvantages of each technology, providing insights into their applications within Java development and data management.

Running head: JAVA DATA PERSISTENCE TECHNOLOGY
JAVA DATA PERSISTENCE TECHNOLOGY
Name of the Student
Name of the University
Author Note
JAVA DATA PERSISTENCE TECHNOLOGY
Name of the Student
Name of the University
Author Note
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1JAVA DATA PERSISTENCE TECHNOLOGY
Table of Contents
Introduction......................................................................................................................................2
Java serialization..............................................................................................................................3
Advantages:.................................................................................................................................4
Disadvantages:.............................................................................................................................4
Java Database Connectivity.............................................................................................................5
Advantages:.................................................................................................................................7
Disadvantages:.............................................................................................................................7
Java data object................................................................................................................................8
Advantages:...............................................................................................................................11
Disadvantages:...........................................................................................................................11
JDO architecture........................................................................................................................11
Java persistence APIs....................................................................................................................12
Java persistence APIs architecture.............................................................................................15
Conclusion.....................................................................................................................................15
References......................................................................................................................................17
Table of Contents
Introduction......................................................................................................................................2
Java serialization..............................................................................................................................3
Advantages:.................................................................................................................................4
Disadvantages:.............................................................................................................................4
Java Database Connectivity.............................................................................................................5
Advantages:.................................................................................................................................7
Disadvantages:.............................................................................................................................7
Java data object................................................................................................................................8
Advantages:...............................................................................................................................11
Disadvantages:...........................................................................................................................11
JDO architecture........................................................................................................................11
Java persistence APIs....................................................................................................................12
Java persistence APIs architecture.............................................................................................15
Conclusion.....................................................................................................................................15
References......................................................................................................................................17

2JAVA DATA PERSISTENCE TECHNOLOGY
Introduction
This report aims to describe the concept that is associated with the java data persistence
technology. Data persistence is mainly referred to the concept that data survives even after the
process associated with the data has ended. In order to make a data persistent, it becomes
essential to write it in non-volatile storage. In other words, it can be stated that data persistence
is the concept that is used for the purpose of defining a piece of information is saved within the
media. The data can be easily recovered from the system even after the process stops the
execution (Iordanov and VMware 2016). The main aim of data persistence within an enterprise
information system is that it ensures better protection towards the data.Different companies are
creating data persistence to make transactions and social events successful. This also supports
effective continuity throughout the enterprise. Thus it becomes essential to have proper data
persistence within the enterprise information system.
The different java persistence technology that is going to be described in the report
includes the java data objects, java database connectivity, java serialization and java persistence
APIs. Java persistence API is mainly used for the purpose of specifying the access that is offered
towards Java and ensures that proper link and persistency is maintained between the Java objects
and relational database. On the other hand, java data objects is mainly a specification that is used
for the purpose of developing to enable transparent persistence with the use of java objects. Java
Database Connectivity is the third technology of java persistence that contains an application
programming interface for providing support towards the programming language Java
(Benelallamet al. 2014).Lastly, the concept of Serialization is referred to the mechanism that used
for converting the state of an object into a byte stream. The report will focus on describing these
Introduction
This report aims to describe the concept that is associated with the java data persistence
technology. Data persistence is mainly referred to the concept that data survives even after the
process associated with the data has ended. In order to make a data persistent, it becomes
essential to write it in non-volatile storage. In other words, it can be stated that data persistence
is the concept that is used for the purpose of defining a piece of information is saved within the
media. The data can be easily recovered from the system even after the process stops the
execution (Iordanov and VMware 2016). The main aim of data persistence within an enterprise
information system is that it ensures better protection towards the data.Different companies are
creating data persistence to make transactions and social events successful. This also supports
effective continuity throughout the enterprise. Thus it becomes essential to have proper data
persistence within the enterprise information system.
The different java persistence technology that is going to be described in the report
includes the java data objects, java database connectivity, java serialization and java persistence
APIs. Java persistence API is mainly used for the purpose of specifying the access that is offered
towards Java and ensures that proper link and persistency is maintained between the Java objects
and relational database. On the other hand, java data objects is mainly a specification that is used
for the purpose of developing to enable transparent persistence with the use of java objects. Java
Database Connectivity is the third technology of java persistence that contains an application
programming interface for providing support towards the programming language Java
(Benelallamet al. 2014).Lastly, the concept of Serialization is referred to the mechanism that used
for converting the state of an object into a byte stream. The report will focus on describing these
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3JAVA DATA PERSISTENCE TECHNOLOGY
technologies briefly so that it becomes easy to understand the concept of java persistence
technologies.
Java serialization
Java serialization is mainly referred to as the mechanism that is used for the purpose of
writing the different states that are associated with an object into a byte stream. This ensures that
the object can be represented in their respective bytes, including all the objects data that contains
all the data regarding the object type. The reverse process is known as deserialization in java
where the main aim is to convert the byte stream (Goeminne et al. 2014). The actions are
performed on a platform-independent area that ensures an object can be serialized in any
platform. In order to serialize an object, the method that is being called is write object() with
method ObjectOutputStream. To serialize an object, there is a special command used that sends
it to the output stream. The command that is used is:
public final void writeObject(Object x) throws IOException
Example for Java serialization:
public class Employee implements java.io.Serializable {
public String name;
public String address;
public transient int SSN;
public int number;
technologies briefly so that it becomes easy to understand the concept of java persistence
technologies.
Java serialization
Java serialization is mainly referred to as the mechanism that is used for the purpose of
writing the different states that are associated with an object into a byte stream. This ensures that
the object can be represented in their respective bytes, including all the objects data that contains
all the data regarding the object type. The reverse process is known as deserialization in java
where the main aim is to convert the byte stream (Goeminne et al. 2014). The actions are
performed on a platform-independent area that ensures an object can be serialized in any
platform. In order to serialize an object, the method that is being called is write object() with
method ObjectOutputStream. To serialize an object, there is a special command used that sends
it to the output stream. The command that is used is:
public final void writeObject(Object x) throws IOException
Example for Java serialization:
public class Employee implements java.io.Serializable {
public String name;
public String address;
public transient int SSN;
public int number;
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4JAVA DATA PERSISTENCE TECHNOLOGY
public void mailCheck() {
System.out.println("Mailing a check to " + name + " " + address);
}
}
Advantages:
The major advantages that are offered with java serialization is that it is used for the
purpose of travelling the objects state on the network.
This can be easily used or can be customized as per the need of the users.
Serialization offers the user to encrypt, compress and authenticate the objects as per the
needs. This also ensures that proper support is being provided under the secure
computing nature of java.
Serialization is also used as a mechanism that can ensure the better exchange of objects
between the C++ and java.
Disadvantages:
Besides the advantages that are offered with serialization, there are some disadvantages
that can impact the performance of the users. The disadvantages that come along with the java
serialization concepts are as follows:
Serialization interface in java does not offer excessive control over the object access.
Serialization does not offer any access to the use of additional APIs.
This does not offer better usability features while using large-sized objects.
public void mailCheck() {
System.out.println("Mailing a check to " + name + " " + address);
}
}
Advantages:
The major advantages that are offered with java serialization is that it is used for the
purpose of travelling the objects state on the network.
This can be easily used or can be customized as per the need of the users.
Serialization offers the user to encrypt, compress and authenticate the objects as per the
needs. This also ensures that proper support is being provided under the secure
computing nature of java.
Serialization is also used as a mechanism that can ensure the better exchange of objects
between the C++ and java.
Disadvantages:
Besides the advantages that are offered with serialization, there are some disadvantages
that can impact the performance of the users. The disadvantages that come along with the java
serialization concepts are as follows:
Serialization interface in java does not offer excessive control over the object access.
Serialization does not offer any access to the use of additional APIs.
This does not offer better usability features while using large-sized objects.

5JAVA DATA PERSISTENCE TECHNOLOGY
To overcome the challenges that are faced with the use of java serialization, the technology
that is being introduced in the world of java is Java database connectivity (JDBC). The main
reason behind using java database connectivity is that it offers huge access to the metadata, and
there is no need to do the installation process (Decan et al. 2017). The next part of the
assessment will describe the Java database connectivity (JDBC).
Java Database Connectivity
Java database connectivity is referred to as the java API that focuses on managing the
connection that is being developed within the database and handles a set of results that are
obtained from the database (Willnecker et al. 2015). In the year 1997, JDK 1.1 was released as a
part of JDBC. Java database connectivity offers a programming level interface that has the
potential to handle the mechanism associated with java application and can communicate easily
with the database of RDBS. The java database connectivity is mainly divided into two layers that
focus on supporting the communication between the java application and java database
connectivity manager (Shah et al. 2014). In addition to this java database connectivity, driver
supports the essential communication that takes place between the database driver and JDBC
manager.
Example:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
To overcome the challenges that are faced with the use of java serialization, the technology
that is being introduced in the world of java is Java database connectivity (JDBC). The main
reason behind using java database connectivity is that it offers huge access to the metadata, and
there is no need to do the installation process (Decan et al. 2017). The next part of the
assessment will describe the Java database connectivity (JDBC).
Java Database Connectivity
Java database connectivity is referred to as the java API that focuses on managing the
connection that is being developed within the database and handles a set of results that are
obtained from the database (Willnecker et al. 2015). In the year 1997, JDK 1.1 was released as a
part of JDBC. Java database connectivity offers a programming level interface that has the
potential to handle the mechanism associated with java application and can communicate easily
with the database of RDBS. The java database connectivity is mainly divided into two layers that
focus on supporting the communication between the java application and java database
connectivity manager (Shah et al. 2014). In addition to this java database connectivity, driver
supports the essential communication that takes place between the database driver and JDBC
manager.
Example:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6JAVA DATA PERSISTENCE TECHNOLOGY
import java.sql.Statement;
classWhatIsJdbc{
publicstaticvoid main(String[] args) {
Connection conn = null;
try {
String url = "jdbc:sqlite:path-to-db/chinook/chinook.db";
conn = DriverManager.getConnection(url);
System.out.println("Got it!");
} catch (SQLException e) {
thrownewError("Problem", e);
} finally {
try {
if (conn != null) {
conn.close();
import java.sql.Statement;
classWhatIsJdbc{
publicstaticvoid main(String[] args) {
Connection conn = null;
try {
String url = "jdbc:sqlite:path-to-db/chinook/chinook.db";
conn = DriverManager.getConnection(url);
System.out.println("Got it!");
} catch (SQLException e) {
thrownewError("Problem", e);
} finally {
try {
if (conn != null) {
conn.close();
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

7JAVA DATA PERSISTENCE TECHNOLOGY
}
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}
}
}
Advantages:
The main advantage that is offered with java database connectivity is that it ensures easy
way to use the solution for one of the perennial needs of java application development.
Java database connectivity is considered the most efficient application for a simple
interface.
Offers a better well-defined data access layer
Disadvantages:
Performance gets degraded as the JDBC call goes through the bridge of ODBC.
This offers a limited set of java features
These are not suitable for large scale application
To resolve the challenges that are faced with the use of java database connectivity an
efficient technology is being used that is known as a java data object (Coward 2014). JDO is a
specification that is developed for the purpose of enabling better and transparent persistence of
}
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}
}
}
Advantages:
The main advantage that is offered with java database connectivity is that it ensures easy
way to use the solution for one of the perennial needs of java application development.
Java database connectivity is considered the most efficient application for a simple
interface.
Offers a better well-defined data access layer
Disadvantages:
Performance gets degraded as the JDBC call goes through the bridge of ODBC.
This offers a limited set of java features
These are not suitable for large scale application
To resolve the challenges that are faced with the use of java database connectivity an
efficient technology is being used that is known as a java data object (Coward 2014). JDO is a
specification that is developed for the purpose of enabling better and transparent persistence of

8JAVA DATA PERSISTENCE TECHNOLOGY
Java objects. This is considered as the high level API that allows the application to store all the
necessary transactions that take place with the data.
Java data object
Java data object is mainly a specification that is developed for the purpose of enabling the
transparent persistence of Java objects. This is the high level API that allows the application to
store all the necessary java objects. Further, this API is used to access the data on any platforms
such as on embedded systems, servers and desktops. Apart from all this, the java data objects are
also implemented to provide better support towards the cell phone, PDA and all the necessary
wireless technologies (Barmpis and Kolovos 2014). This provides a better means for treating the
stored data within the relational database. The structure and example of the java data object is as
follows:
public class Student {
private String name;
individual String address;
private String student;
private String department;
public Student(String name, String address, String studentID,
String department) {
this.name = name;
this.address = address;
Java objects. This is considered as the high level API that allows the application to store all the
necessary transactions that take place with the data.
Java data object
Java data object is mainly a specification that is developed for the purpose of enabling the
transparent persistence of Java objects. This is the high level API that allows the application to
store all the necessary java objects. Further, this API is used to access the data on any platforms
such as on embedded systems, servers and desktops. Apart from all this, the java data objects are
also implemented to provide better support towards the cell phone, PDA and all the necessary
wireless technologies (Barmpis and Kolovos 2014). This provides a better means for treating the
stored data within the relational database. The structure and example of the java data object is as
follows:
public class Student {
private String name;
individual String address;
private String student;
private String department;
public Student(String name, String address, String studentID,
String department) {
this.name = name;
this.address = address;
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

9JAVA DATA PERSISTENCE TECHNOLOGY
this.studentID = studentID;
this.department = department;
}
public String getName()
{
return name;
}
public String getAddress()
{
return address;
}
public String getStudentID()
{
return studentID;
}
public String getDepartment()
{
this.studentID = studentID;
this.department = department;
}
public String getName()
{
return name;
}
public String getAddress()
{
return address;
}
public String getStudentID()
{
return studentID;
}
public String getDepartment()
{
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

10JAVA DATA PERSISTENCE TECHNOLOGY
return department;
}
public void setName(String name)
{
this.name = name;
}
public void setAddress(String address)
{
this.address = address;
}
public void setStudentID(String studentID)
{
this.studentID = studentID;
}
public void setDepartment(String department)
{
this.department = department;
return department;
}
public void setName(String name)
{
this.name = name;
}
public void setAddress(String address)
{
this.address = address;
}
public void setStudentID(String studentID)
{
this.studentID = studentID;
}
public void setDepartment(String department)
{
this.department = department;

11JAVA DATA PERSISTENCE TECHNOLOGY
}
}
Advantages:
Java data object offers a toolbox towards the programmers to store and retrieve the
objects state.
Java data object offers encapsulation towards all the data and ensures that the
programmers are accomplishing persistence.
Java data objects offer a better opportunity towards the programmer as it ensures a better
relational model and only considers the constructing queries.
Disadvantages:
The main disadvantages are that the object gets once the application ends. This turns to
be one of the major problems while executing an application. However, in the context of Java,
new technologies are being invented that can support better features to develop the project.
JDO architecture
1. The essential components that are associated with the JDO architecture include the
JDOhelper that contains all the static helper methods to the query.
2. PersistenceManagerFactory is a factory that offers access to the PersistenceManagers.
3. PersistenceManager is the primary interface of JDO that is used by the application.
4. The JDO uses PesisteneceCapable for calling the user-defined persistent classes.
5. The transaction allows the operation on persistent data to be grouped effectively so that
they can ensure better performance.
}
}
Advantages:
Java data object offers a toolbox towards the programmers to store and retrieve the
objects state.
Java data object offers encapsulation towards all the data and ensures that the
programmers are accomplishing persistence.
Java data objects offer a better opportunity towards the programmer as it ensures a better
relational model and only considers the constructing queries.
Disadvantages:
The main disadvantages are that the object gets once the application ends. This turns to
be one of the major problems while executing an application. However, in the context of Java,
new technologies are being invented that can support better features to develop the project.
JDO architecture
1. The essential components that are associated with the JDO architecture include the
JDOhelper that contains all the static helper methods to the query.
2. PersistenceManagerFactory is a factory that offers access to the PersistenceManagers.
3. PersistenceManager is the primary interface of JDO that is used by the application.
4. The JDO uses PesisteneceCapable for calling the user-defined persistent classes.
5. The transaction allows the operation on persistent data to be grouped effectively so that
they can ensure better performance.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 19
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.