Progress DataXtend
SOLUTIONS
PRODUCTS
SERVICES
CUSTOMERS
PARTNERS
RESOURCES
SUPPORT
NEWS & EVENTS
ABOUT US

Print Version

Object Relational Mapping

Deliver applications faster with graphical tools for rich Object-Relational Mapping (O-R Mapping). Progress® DataXtend™ CE delivers the tools that best supports your development process.

Persistent data access consumes a large portion of development effort and accounts for the most expensive operations at runtime. While object-oriented development dominates in the enterprise, the majority of business-critical data is stored in relational database management systems (RDBMS).

To bridge this gap, Progress® DataXtend CE® technology provides tools for object-relational (O-R) mapping that relieve developers of this task. DataXtend CE tools offer more flexibility than the competition because they fit in naturally with your existing development process, whether that be model-driven, schema-driven, or somewhere in between.

Unlike most O-R mapping technologies, DataXtend CE supports equivalent functionality for C#, C++, and Java development. However, DataXtend CE offers much more than O-R mapping. Uniquely, DataXtend CE mapping technology builds in the performance and scalability required by data-intensive applications with closely-coupled intelligent data caching and cache clustering (or cache synchronization). Broad support for application servers, operating systems and databases make it possible to provide a unified data services layer in heterogeneous environments.

O-R Mapping

Figure 1: DataXtend CE Data Services Layer

Data services help development organizations attain to the main goals of a service-oriented architecture (reference whitepaper "Data Considerations for Building SOAs"), loose coupling and re-use. One of our customers, a major financial organization, currently leverages DataXtend CE technology as a common data service for multiple applications. This architecture allows them to achieve high transactional throughput, while saving more than 50% of development effort for each new system they roll out.

Object Relational Mapping:
Delivering Value by Boosting Developer Productivity

Topics:

Why Not Write Your Own Mapping?

The mismatch between objects and relational records is a well-understood and documented problem. Search the web for "object relational impedance mismatch" and you will find a range of suggestions that illustrate the difficulty involved in solving this problem efficiently. In general, the solutions fall into one of two main camps: both design and write your own persistency layer (which is necessary even if you choose to use standards like JDBC, see DataDirect, or DataXtend CE).

There are varying levels of do-it-yourself, ranging from embedding SQL to using APIs such as ADO.NET. The challenges of using these approaches include:

  • O-R mapping requires cooperation between those trained in two disparate fields: object-oriented development and relational database administration. Within large organizations, developers and DBAs usually belong to different departments with different priorities.
  • APIs that force developers to deal with rows and columns do not deliver the full O-R mapping benefit of allowing developers to deal with objects.
  • Writing code to persist objects to a database is complex and error-prone. An R.B. Webber study found that data access accounts for up to 40 percent of the overall application code in enterprise systems. Experts estimate the amount of code required to persist and retrieve a single object ranges from hundreds to thousands of lines!
  • Home-grown solutions do not usually have general applicability across an enterprise. Each project reinvents the wheel and incurs redundant expenses for design, development, and testing.
  • Home-grown solutions can cause data "silos" within an organization that prevent the free flow of information across departments and functional units.

The ideal solution for data access relieves developers from writing low-level infrastructure and supports complex object models, while building in performance and scalability. DataXtend CE meets these requirements in three key ways:

  1. By simplifying data model design and O-R mapping with automated tools.
  2. By providing a high quality, flexible data access layer that reduces testing and debugging efforts.
  3. By integrating O-R mapping with intelligent data caching and cache clustering (or cache synchronization) to ensure performance, scalability and data integrity without additional programming.

What Advantages Does DataXtend CE Mapping Provide?

O-R mapping requires a bridge between application architects and database schema designers. Each speaks a different language and has different objectives. Achieving business objectives usually requires compromises from both sides. DataXtend CE tools allow the object model to impose as few constraints on the relational schema as possible, and vice-versa. This results in a highly usable solution for all stakeholders.

DataXtend CE mapping classes reflect years of development, quality assurance, and testing-both internally by DataXtend CE and externally in real application environments. By using DataXtend CE mapping classes, you save the resources that would otherwise be required to write and test the persistency layer of your application. Each mapping object exposes a simple, well-defined interface that shields business objects from implementation and database-specific details and insulates developers from low-level data management details.

How Does DataXtend CE Support Model-Driven and Schema-Driven Development?

To be effective, development tools should fit naturally into an organization's existing process. DataXtend CE offers a choice of tools that support model-driven and schema-driven design.

Model-Driven Development

Model-driven development emphasizes the visual representation of objects and the relationships between them using tools such as IBM® Rational Rose. Model-driven development strives to separate implementation details from the architecture to improve design. DataXtend CE Add-Ins extend Rational Rose's modeling capabilities to include persistent stereotypes for entities, associations, and generalizations. The Add-Ins deliver true model-driven development by automatically producing a persistent data infrastructure from the model!

Schema-Driven Design

DataXtend CE includes Eclipse Plug-Ins for Java development and Workbench Tools for C++ and C#. These tools all provide a Database Explorer that allows you to browse an existing database schema and drag-n-drop tables into the DataXtend CE project, effectively jump-starting development.

Download an evaluation and experience the development benefits of DataXtend CE for yourself.

Rich Mapping Capabilities

DataXtend CE tools support the following types of table mapping within an inheritance hierarchy:

  • Horizontal - Maps one database table to a single entity; Rows in the table map to instances.
  • Union - Maps one database table to a contiguous subtree in the inheritance hierarchy; Rows in the table map to instances of the various classes in the hierarchy.

>> Tech Brief: Modeling/Mapping Flexibility in DataXtend CE

What Hierarchy Best Supports Horizontal Mapping?

Applications with horizontal mapping perform best when an inheritance hierarchy:

  • Contains subclasses with relatively more distinct attributes, rather than mostly common attributes defined on a base class.
  • Contains relatively fewer concrete classes.

When using horizontal mapping for entities in a hierarchy, you map each concrete entity to a different database table. This means that columns must be duplicated in multiple tables for some data. Attributes common to the class hierarchy (those that originate in the base class, such as keys and common attributes) appear in each subclass; their database columns likewise appear in the corresponding database tables.

Classes mapped horizontally perform best when they:

  • Issue queries on base classes most often, rather than querying the subclasses.
  • Frequently update the base class attributes.

What Hierarchy Requires Union Mapping?

Union table mapping in an DataXtend CE project encompasses a portion of an entity hierarchy, concrete members of which are then mapped to the same table. Entities can participate in a union table mapping if they are part of a contiguous inheritance subtree. Thus, they share a common base class, and there are no intervening horizontally mapped classes or other union mappings.

Applications using union table mapping perform best when your object model:

  • Contains base classes with the majority of attributes, while the subclasses contain few (the inherited attributes are common across the classes).
  • Contains many classes.

You will also find union mapping easier to work with if changes tend to occur in the base class. Where horizontal mapping would require you to modify a table for every class, union mapping restricts these changes to a single table.


Contact us to gain more insight and to learn more about the products and technologies from Progress Software.

Related Topics:

You may also be interested in:

 
 



 

Evaluate DataXtend CE
A distributed, persistent data infrastructure for applications.
> Download DataXtend CE

 

Data Considerations for Service-Oriented Architectures
> Read Whitepaper