Leaving the Data in the Relational Database

Most commonly, data that's already stored in the database is allowed to remain in the relational database and it is accessed as it is needed. This allows relational data and object data to exist together in the same system without converting the relational data.

The class hierarchy you create for the existing data allows you to access the non-object data in an object manner. In this example, the views used to create the classes at the various levels would be used at run-time to imitate the object structure. For instance, the Employee View would imitate querying the object structure at the Employee Class level. See and .

The upside of this approach is that you can leave all your existing data in place and yet have an object schema of the data that can be used by object applications. This is one of the excellent uses of object-relational mapping products.

The downside of this approach is that you generally will not get higher performance from your data in the object application. You may if you can take advantage of caching the data in the client application, thereby minimizing access to the relational database. See .

It is the access to the relational database that is not faster. In fact it may be slower because of the additional layer of software to convert relational tuples to object instances. Also, accessing classes using underlying relational views that use joins could still be quite slow, depending how slow the joining operations are in the Relational DBMS. In the example of the Workstudy Class, it requires the use of joins. See .

If the application cannot take advantage of caching the results of these joins, there is a potential performance problem. Finally, still will use index searches and, in some cases, intersection entities and joins, when the relational data accessed by the objects first comes from the Relational DBMS.

Next: . Also see the related content below.

Context for Leaving the Data in the Relational Database

Home » Articles » Object-Relational Mapping Articles » Using Existing Relational Schema » Using the Data » Leaving the Data in the Relational Database

Related Articles for Leaving the Data in the Relational Database

The Savvy Manager's Guide

is also the author of a book that explains Web Services, service-oriented architecture, and Cloud Computing in an easy-to-understand, non-technical manner.

Web Services, Service-Oriented Architectures, and Cloud Computing: The Savvy Manager's Guide

by with David Dick

This is a guide for the savvy manager who wants to capitalize on the wave of change that is occurring with Web Services, service-oriented architecture, and—more recently—Cloud Computing. The changes wrought by these technologies will require both a basic grasp of the technologies and an effective way to deal with how these changes will affect the people who build and use the systems in our organizations. This book covers both issues. Managers at all levels of all organizations must be aware of both the changes that we are now seeing and ways to deal with issues created by those changes.