As Figure 5-20 illustrates, the value of the foreign key in the source table mapped to the primary key of the target table is unique. No primary key values among the target tables are the same, so primary key values are not unique just in the table, but also among the tables.
Figure 5-20 Unique primary key
Because there is no indicator stored in the source table, TopLink cannot determine to which target table the foreign key value is mapped. Therefore, TopLink reads through all the target tables until it finds an entry in one of the target tables. This is an inefficient way of setting up a relation model, because reading is expensive. The class indicator is much more efficient and it reduces the number of reads performed on the tables to get the data. In the class indicator method, TopLink knows exactly which target table to look into for the data.
The principles of defining such a variable class relationship are similar to defining class indicator variable one-to-one relationships, except:
The type indicator field and its values are not needed, because TopLink goes through all the target tables until data is finally found.
Copyright © 1997, 2004, Oracle. All rights reserved.