ABSTRACT

Designing a relational database schema that interacts with an objectoriented language is more difficult than it first appears. As gleaned from Chapter 6, object-oriented languages hold data in objects that consist of the data and the methods to support the data. In a relational database, the data is normalized to support efficient storage and access. The application creates an object that contains collections of data and processes the data as an object. The data in one object can map to multiple tables and possibly multiple databases. The problems encountered when mapping an object-oriented language, such as Java or C++, to a declarative language, like SQL, are called impedance mismatch. Impedance mismatch is caused by the fact that one object in the application can contain data from multiple tables and multiple rows within a table, as seen in Figure 7.1.