Mapping Objects to Tables

Mapping Objects To Tables [Kel97] (download it now, pdf) is a stand alone pattern language fragment of it's own, that answers questions of how object-oriented constructs like inheritance, aggregation, or relations can be mapped to the semantics of relational databases.

Local Roadmap

or_roadmap_mappings.gif (4147 Byte)

Figure 13: Local Roadmap for Mapping Objects to Tables

Forces Driving Mapping and Performance Optimization

The forces driving the mapping and performance optimization patterns have been in other papers on Mapping Objects To Tables [Bro+96, Kel97, Hei98] and Accessing Relational Databases [Kel+98a]. Space does not permit us to include these patterns here in full, so this section contains only a brief overview.

Performance is a major consideration in object/relational if you build an access layer. To be usable, the layer has to work fast enough. Often there are tradeoffs between Read and write/update performance. Flexibility and maintenance cost will in most cases conflict with complexity, so the more flexible you build a system the more complex and expensive it will become. Performance can often be improved by redundancy and will then collide with versus maintenance cost and normal forms of the relational model [Dat95]. Space consumption of the database also collides with Performance of an application.

The need for query processing is another force with some influence - it collides with performance optimal mappings. For example building a data warehouse often implies separating the queryable data from the data needed for fast online processing. And finally, potential integration with legacy system via the database will often collide with the best performing mapping and will add complexity if you have to integrate existing table structures.

Pattern List

Find all the above Patterns in [Kel+97] and also with another level of detail in [Bro+96].

-> on to Performance

-> up to the Contents Page

Related Stuff - Quick Introductions:

If you need a quick intro, patterns might not be the optimal thing to start with to get an overview. Therefore we have a few links below with stuff that is faster to read. The advantage of the patterns you find here is more that they list the forces which you should take into account when really implementing a solution because there are some nasty details that are rarely presented in the articles that give you the quick picture.

rd_pin.gif (1016 Byte)there's a "quick tour" by objectmatter on object/relational mapping

rd_pin.gif (1016 Byte)Scott Amblers paper on Mapping Objects to Relational Databases also contains the basic mapping strategies

rd_pin.gif (1016 Byte)the online article by ChiMu about foundations of object/relational mapping is also interesting if you prefer a quick intro which is not pattern style

rd_pin.gif (1016 Byte)the site by  offers articles, also on mapping. Their main  focus is on comparing products. Worth the visit.