StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Mathematical Concepts and Processes in Storytelling - Report Example

Cite this document
Summary
The paper "Mathematical Concepts and Processes in Storytelling" discusses that the first technology used in Java is serialization. It is applicable to convert the state of the object into a byte stream so that persistency for objects is received on the network…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER96.6% of users find it useful

Extract of sample "Mathematical Concepts and Processes in Storytelling"

Student ID

Introduction

Data Persistence is one of the biggest aspects of any organization who want to utilize their existing information. The enterprise information system handles every business process very effectively without any concerns. However, with new hardware or software upgrades, the changes made could also affect the metadata. The persistence of data helps implement and incorporate information even if the creator software or hardware does not exist. Similarly, object-oriented programming languages also use the concept of data persistence to extend the life of the objects created. This report will include a debate on several options from which persistence in Java is achieved effectively. On the other hand, all four options with their benefit and limitations could be established to achieve object persistency through software code examples. Overall, data persistence can support the integration of core information for other purposes, including predictions, management of data including customers, sales, and order processing in a very planned and structured approach only.

s

There are several definitions of data persistence. However, it can be described as static data that cannot be changed or accessed very frequently. Whereas, persistent data involves core information or dimensional data to perform predictive analysis, including demographics including customers, suppliers, and orders through data warehouses (Smith 2016). There are two important aspects of persistent data in which secondary usage of data for predictions and data retrieval every time file is closed again and again (XIA & LI 2009). It is relatively important for enterprise information systems because master data for organizations require a more stable condition. Persistent data is saved even after the process from which it was established was removed or deleted completely. The enterprise information system or EIS consists of all important information related to business processes, customer, sales, marketing, and order processing, followed by accounting management (Hong, Zhao & Wang 2015). Thus, data should be kept under non-volatile storage, which will not remove even after one system is changed to another.

Java is an object-oriented programming language and has everything dependent on the objects. An object acquires memory for a shorter period; however, with persistence, it could exist even its creator is destroyed through Java persistence technologies. This report will strategically discuss four options presented for persistence, including Java Serialization, Java Database Connectivity (JDBC), Java Data Object (JDO), and Java Persistence APIs. Therefore, all such technologies with their advantage and limitations are discussed below through the help of source code examples to analyze it.

Java Serialization

Working Principle:

The working principle is explained in figure 1. Java is an object-oriented programming language in which each object is created to store in the memory space. However, serialization of objects is done so that conversion of objects or instances could be accomplished in binary format (Yu 2012). This format is persisted onto disk or works over a network and could run on Java virtual machine. However, once the serialization occurs, then the reverse process is implemented to convert binary data format into the original object through deserialization in a java programming language. Furthermore, the below diagram showcases how the working principle of java serialization works. For example, an object of employee class is created then made serializable. The byte stream generated will be stored into a file, and reverse will again happen to convert information into a byte stream. In addition to that, serialization and deserialization require to offer several APIs, interfaces, and methods. For example, java.io.Serializable, java.io.Externalizable interface will be implemented to serializing an object; while, two methods will be used to read and write the stream such as ObjectInputStream and ObjectOutputStream. Thus, serialization is a very important aspect of java programming as it supports the conversion of data into a byte stream and vice versa.

Advantages

  • This method is easily used and can have proper adjustment as per the customization.
  • Java serialization has a serialized stream that supports secured java programming due to strong authentication, encryption, and compression for the secured layer.

Limitations

  • However, one of the limitations is that large-size objects cannot be supported and make overhead issues.
  • Furthermore, the garbage collection process has delayed making capture a large amount of memory space issues.
  • To remove the issue, JDBC API will be more considerable because it will support the storage and retrieval of data with a much larger size to avoid inconsistency and memory consumption.

Source Code Example:

In this code example, it has explained both the serialization and deserialization process for employee class. In the first source code, the employee class implements the Serializable interface or known as marker interface, which does not have methods. Besides, new employee object emp is created where the concept of serialization is implemented. The employee emp is serialized, which involves invoking methods to store byte stream into a file. Once serialization is implemented, now reverse is required to store the file into a byte stream. Thus, a method to involve an object is implemented for the employee object deserialization process.

Java Database Connectivity (JDBC)

Working Principle:

The JDBC stands for Java database connectivity, an API offered by Java so that databases could be integrated with the core programming process (). However, it also provides a set of java classes and methods for including database access in the client-server language of an object-oriented language. This technology helps achieve data persistence due to the implementation of a set of interfaces to manage memory issues very clearly. The working principle in figure 2 explains that the driver is implemented in language programs through JDBC statements that route the SQL argument, which has a database engine. Furthermore, the JDBC connectivity stores and retrieves information through the help of SQL queries fired in the source code only. It should be noted that SQL statements and queries ate operated whenever a JDBC class and interface are called within a java application. The driver has a huge responsibility to call and overall manage JDBC API, followed by sending and receiving java application input-output processing. There are two important layers of the JDBC interface, including JDBC API that offers support among java application and manager as well as JDBC driver, which offers communication among managers and drivers properly (Tyson 2019). In figure 2, servlets will access all the JDBC resources and then send back on JSP pages.

Advantages

  • The drivers are helpful to read databases. However, drivers must be installed and used properly to ensure the connection stays with source code and tables to store and retrieve information.
  • There is no need to store the XML format of data from the database because everything is automatically managed.
  • The content for data is not converted, and everything is managed the same.
  • The query and stored procedures are managed well enough as well as processing could be done through both synchronous and asynchronous.
  • All the modules and queries are accomplished efficiently through JDBC connectivity.

Limitations

  • One of the biggest issues with JDBC connectivity is that the driver's connection is very delicate to accomplish.
  • The lack of right drivers on the source code and ensuring them to use properly for the database will make a bigger concern for accomplishing the whole process.
  • More time is required to manage every single database with the right type of driver connection.
  • The single sequence for updating and inserting more than one table has become an issue in this technique.
  • To make the connection more stable, there is a need to accomplish new and stable technology for multiple table insertions and updates.

Source Code Example:

The source code depicts how the connection is made into the code for retrieving and fetching data from the database to and vice versa. First of all, the driver is loaded by making registration through classes, including Class .forName (), in which the driver's class file will be loaded into the memory on a runtime basis. On the other hand, DriverManager.registerDriver () is another method through which static members could be registered by calling constructors in the compilation. As the driver is loaded, the next step was to make a connection by using connection method getConnection() in which URL, username, and password from which SQL command prompt is accessed will be allocated. The con was used as a reference to the connection interface whereas, URL is a uniform resource locator. In the source code below, a statement is created in which connection is made, and interaction with the database through interfaces is done such as JDBCStatement, CallableStatement, and PreparedStatement interfaces. Their work is to explain a method that establishes retrieve and fetching of data from the databases. Query execution will take place so that data storage, update, retrieve, and delete from the database will occur. There are two important methods, including the executeQuery () method so that data could be retrieved and executeUpdate() where all the records of the table are updated efficiently through program code. Henceforth, the data connection should be closed for which close() method is used by closing connection so that interface will close the connection completely.

Java Data Object (JDO)

Working Principle:

Java data object is used for achieving transparent persistence and works both for object and relational data programs. JDO offers connectivity for relational databases through persisting objects. Furthermore, persistence is a process in which information is stored once the program has completed. In addition to that, it achieves persistence, through the help of serialization for keeping structural objects into databases. Furthermore, JDO is replicable from the programming interface so that the persistence of objects is achieved through XML metadata and bytecode upscaling. Another feature of JDO is to get support for persistence transparency with the help of JDO instance.

The java objects cannot see the JDO instance created due to a transparent framework that also not required java classes. Furthermore, no need to use getter or setter methods and making private visibility. The relational databases and object databases execute all the programs, and even the XML document is relatively helpful. JDO offers transparency from the database and gest supported by databases and portability of applications easily. There is no need to perform any more compilations and thus making JDO features unique like portability, high performance, EJB integration, object transparency, and ease of use. Three classes are frequently used in JDO, including persistence capable that gets persisted into databases completely; persistence is aware that could be manipulated and needs proper enhancement with metadata; last is the normal Class that cannot be stored for persistence data not need JDO metadata.

Advantages

  • One of the basic benefits of JDO is that it could be easily used. In other words, application programmers have the objective to work on the domain object model and leave rest aside.
  • Secondly, due to JDO APIs, portability is another benefit because multiple implementations of source code could be reused through metadata, which stores persistence information and behavior through the O/R mapping feature.
  • Another advantage is that java programmers could use persistence data from JDO due to higher quality and performance using data patterns to increase the overall ability for application.
  • The database is completely independent of the database due to support from data stores, including relational databases, object databases, XML files, and flat files.
  • EJB integration is support, for example, remote message processing and security module for enterprise for better interaction.

Limitations

  • Choose wisely for any project.
  • Not capable of implementing for smaller java applications.

Source Code Example

In the below source code, a class is created for students with objects created for the name, address department, and student ID. The JDO objects are created here to develop the transparency framework.

Java Persistence APIs (JPA)

Working Principle:

Java Persistence API or JPA is a standard through which databases could be accessed from java applications. One of the key features of JPA over JDBC was that JPA showcase data through classes and objects instead of table records in rows and columns compared to JDBC connectivity in the previous source code example. The persistent data will be depicted with the help of plain old java objects or POJO. Furthermore, JPA will be implemented so that relational databases could interact in the java application, including Oracle, DB2, SQL Server, and MySQL. The supported JPA implementations also include Hibernate, TopLink, EclipseLink, which works as an object-relational mapping tool. The purpose of this mapping tool will be to create relational databases and java applications through classes and objects. The ObjectDB will behave like a database management system that contains support from Java Persistence API. The interaction with this ObjectDB makes the application much portable and machine-independent. The purpose of the ObjectDB is to give simplification and faster development process support, thereby removing the ORM layer completely, making the java application run much faster. JPA does not require any coding for database connectivity because it reduces the concept of JDBC connectivity and makes the logic more independent. Hence, JPA is quite useful in removing complex issues for SQL queries.

Advantages

  • It increases the productivity of the developer due to a lack of database mapping.
  • The abstraction of the database is independent, with SQL working separately.
  • The data cache is another benefit of this method.

Limitations

  • It should be selected wisely for any project undertaken.

Source Code Example:

In the below source code, a class musician exists that has several values, including id, name, main instrument names, and array list to store performance.

Conclusion

The purpose of this report was to understand the concept of data persistence, which allows all the enterprise to work its continuation and sink even if the original flash or memory is wiped off. In addition to that, persistent data supports all the information related to enterprise, including its customers, business transactions, and decision-making process. Within this report, java persistence technologies were discussed to understand how data persistence could be managed efficiently.

One of the first technologies used in Java is serialization, in which the object's state could be saved properly. It is applicable to convert the state of the object into a byte stream so that persistency for objects is received on the network. Another java persistence technology was Java Database Connectivity or JDBC, which is a standard for Java API that connects databases through independent to connect databases through programming constructs. It was identified that JDBC connectivity is helpful in storing and retrieve information through source code. In comparison, java data object or JDO is useful so that database could be accessed without any explicit call through structured query language or SQL. Finally, Java persistence APIs or JPA is another data persistence framework through which java objects and classes could be accessed and managed information efficiently.

To conclude, this report established that data persistence is a very important and crucial factor that should be considered for an enterprise information system. The huge data should be saved even after the work is accomplished because master data is achieved through it, which is static and cannot be changed immediately. The four options are to achieve the data persistence process in Java as an object-oriented programming language for a much better understanding. Overall, each option has some advantages and disadvantages, which was discussed to select one out of them.

Read More
Therefore, all such technologies with their advantage and limitations are discussed below through the help of source code examples to analyze it.

Java Serialization

Working Principle:

The working principle is explained in figure 1. Java is an object-oriented programming language in which each object is created to store in the memory space. However, serialization of objects is done so that conversion of objects or instances could be accomplished in binary format (Yu 2012). This format is persisted onto disk or works over a network and could run on Java virtual machine. However, once the serialization occurs, then the reverse process is implemented to convert binary data format into the original object through deserialization in a java programming language. Furthermore, the below diagram showcases how the working principle of java serialization works. For example, an object of employee class is created then made serializable. The byte stream generated will be stored into a file, and reverse will again happen to convert information into a byte stream. In addition to that, serialization and deserialization require to offer several APIs, interfaces, and methods. For example, java.io.Serializable, java.io.Externalizable interface will be implemented to serializing an object; while, two methods will be used to read and write the stream such as ObjectInputStream and ObjectOutputStream. Thus, serialization is a very important aspect of java programming as it supports the conversion of data into a byte stream and vice versa.

Advantages

  • This method is easily used and can have proper adjustment as per the customization.
  • Java serialization has a serialized stream that supports secured java programming due to strong authentication, encryption, and compression for the secured layer.

Limitations

  • However, one of the limitations is that large-size objects cannot be supported and make overhead issues.
  • Furthermore, the garbage collection process has delayed making capture a large amount of memory space issues.
  • To remove the issue, JDBC API will be more considerable because it will support the storage and retrieval of data with a much larger size to avoid inconsistency and memory consumption.

Source Code Example:

In this code example, it has explained both the serialization and deserialization process for employee class. In the first source code, the employee class implements the Serializable interface or known as marker interface, which does not have methods. Besides, new employee object emp is created where the concept of serialization is implemented. The employee emp is serialized, which involves invoking methods to store byte stream into a file. Once serialization is implemented, now reverse is required to store the file into a byte stream. Thus, a method to involve an object is implemented for the employee object deserialization process.

Java Database Connectivity (JDBC)

Working Principle:

The JDBC stands for Java database connectivity, an API offered by Java so that databases could be integrated with the core programming process (). However, it also provides a set of java classes and methods for including database access in the client-server language of an object-oriented language. This technology helps achieve data persistence due to the implementation of a set of interfaces to manage memory issues very clearly. The working principle in figure 2 explains that the driver is implemented in language programs through JDBC statements that route the SQL argument, which has a database engine. Read More

Cite this document
  • APA
  • MLA
  • CHICAGO
(Mathematical Concepts and Processes in Storytelling Report Example | Topics and Well Written Essays - 2500 words, n.d.)
Mathematical Concepts and Processes in Storytelling Report Example | Topics and Well Written Essays - 2500 words. https://studentshare.org/information-technology/2095548-java-data-persistence-technology
(Mathematical Concepts and Processes in Storytelling Report Example | Topics and Well Written Essays - 2500 Words)
Mathematical Concepts and Processes in Storytelling Report Example | Topics and Well Written Essays - 2500 Words. https://studentshare.org/information-technology/2095548-java-data-persistence-technology.
“Mathematical Concepts and Processes in Storytelling Report Example | Topics and Well Written Essays - 2500 Words”. https://studentshare.org/information-technology/2095548-java-data-persistence-technology.
  • Cited: 0 times
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us