Introduction
Object Relational Mapping is a technology in programming that is used to convert data between objects and relational systems. Object Relational Mapping technology is a technique that has been there for a long time and there are substantive innovations which have been made. In normal circumstances, an object oriented application makes use of an application programming interface (API) when it is communicating with a database. The API will in turn call some commands which will be used to communicate with the database. The code that is used by the API is different, although not much, from one class to another. It is almost the same from one application to another. The problem is that the process of writing the code is very involving. This is where ORM comes into play.
Although there is increased advances towards adopting the use of ORM in communicating with eh database, ORM is not yet the popular solution in many industrial applications. This is because most developers do not have confidence when using ORM.
One of the problems that are associated with ORM is the learning curve for the developers. Most developers are aware of the tools that are used in connecting various programming languages with the database. . NET users know of ADO.NET, Java users are comfortable with JDBC and Visual Basic are aware and know about ActiveX and data objects. There are technologies that come with ORM. These include Hibernate, iBatis and TopLink. These are the technologies that are required when one is to use ORM when connecting a programming language with the database using ORM. This is a big problem in the adoption of ORM technologies. Without regard to the ORM technology that one settles on, there are still few developers who are aware with ORM technology. There will also be some costs that the organization will have to incur in the training of the developers to learn how to use ORM technology.
There are also issues of bureaucracy when implementing new technologies. This is something which is common with any new technology that is being implemented in any organization. Another issue that is an obstacle to ORM technologies is the implementation costs. It is a substantial undertaking to install and test ORM technology.
ORM has been seen to be slow in their adoption. This statement has some truth in it. When an ORM solution is structured in a naive manner, it is bound to perform poorly. This is one reason why many managers do not advocate for the adoption and use of ORM technologies. There are new modern innovations of ORM which are not architecture in naïve manner. iBatis and Hibernate are designed to eradicate this issue of poor performance.
Another weakness that has been seen to affect ORM implementation is about sensitivity to revisions. ORM works best if there are no revisions expected in database, application or the metadata that is ever used again. ORM is sensitive to future revisions of the hosting application and database. Unfortunately, it is impossible to have an application or database system in place and fail to revise or add some features.
Another notable problem is that of compatibility with legacy systems. When a system or database application need to be integrated with the existing application, it is hard to use data source that was used in the old system. In most situations, there are periodical updates to be implemented in the application systems that are installed on the systems.
ORM is not a new technology because it has been there for long. There are developments which have been experienced with object oriented technologies. The first instances of ORM technologies were not that effective because they were seen to be clumsy. The ORM technologies that are in use today provide many features that help developers in the development and in normalization.
Some of the most improved areas of ORM technologies have been seen in the category of performance. One of the earliest criticisms of ORM was that it could be compared to other technologies which are bundled together with connecting mechanisms like Java and JDBC, and yet these technologies were better off than the initial versions of the ORM. This has been improved with standardization taking effect with ORM technologies.
Technologies used in ORM
There are technologies that are associated with ORM. These technologies are either used by other technologies associated with ORM or they are used independently.
Hibernate
XML
One of the technologies is XML. eXtensible Markup Language is a language that is used to represent the transfer of metadata. With the advancement of the internet, there is a lot of data that is being handled. In ORM, XML is used by Hibernate to keep its metadata in documents. This is where XML comes into play. The syntax and the way Hibernate arrange the data are enforced by the syntax of XML. The structure is enforced by Document Type Definition. There is nothing that restricts ORM users from using XML in their metadata. There is no difference between XML and other textual mappers in handling metadata. This, therefore, leaves us to regard XML as part of most applications of ORM. Mappers use graphical user interface when handling mapping metadata because it is easy and efficient.
Hibernate
This is one of the most common technologies that are used in ORM. It has been open source and not sold for commercial purposed. It has been in existence since 2001. The technology was first developed for Java and was later used in .NET under NHibernate; this was in the year 2005. Hibernate cannot be regarded as the oldest technology that has been used in ORM. It is a stable system that is mature in most undertakings. It has mature developments that enable ORM to function in the most elaborate manner. Hibernate has some modern developments so that it brings rich features to the use of ORM.
For there to be persistence with Hibernate, objects do not need to be implemented using any Hibernate APIs. They also do not need to be placed in any wrapper objects belonging to Hibernate. Hibernate is able to have a persistence of creation of ordinary classes without the need of having other special classes in use. Instead of using any special interfaces of attributes of specific devices, Hibernate makes use of XML files to map metadata. The session layer of Hibernate is made up of Session and Transaction classes. This is the architecture of the API of Hibernate. The classes that exist in the business layer are from the developers of the application. These classes achieve persistence with the use of persistence layer. Under the persistence layer is the database layer. The Hibernate API connects and forms interaction with the database API with the use of database APIs like JDBC.
JDBC
JDBC is a database API that is used for applications that are developed using the Java language. They allow applications that have been developed using Java 2 Platform Enterprise Edition (J2EE). The JDBC is used to enable a connection between the application layer and the JDBC driver. Compared with ORM, JDBC is inefficient when large programs are used. This will require that hard programming will be undertaken. This is where ORM is better than JDBC. With ORM, there is no need to develop queries for each transaction and interaction with the database. With ORM, there is the development of an API which is standardized so that the connections with the various applications will be persistent. Another lacking comparison is that ORM is slower when compared to JDBC.
Ongoing research in ORM technology
There is a need to ensure that the performance of ORM is improved to beat the current state. They are slow, compared to other connections to databases. There is also a need to have a standardized persistence solution. Currently, developers will have to learn the various technologies that help in persisting. When the persistence is standardized, then the performance is improved and the developers will no longer have to learn the technologies that have been used. This will improve on the developments and the use of ORM. There are also undergoing automation of support for revisions to the system. Currently, when there is an update to be made to the application, it will not auger well with the ORM technology in place. There is also a development and research going on to improve the support of legacy systems. This will help in situations where the application(s) will have to share a database.
References
Begin, C., Brandon, G., & Meadors, L. (2007). iBATIS in Action. Manning, Greenwich: CT.
Christian, B., & Gavin, K. (2005). Hibernate in Action. Manning, Greenwich: CT.
Deborah, A. (2006). The quarks of object-oriented development. Communications , 49, 123-128.
Fowler, M. (2003). Patterns of Enterprise Application Architecture. Boston: Addison-Wesley.