| |
 |
|
Data Warehousing Inheritance
Oracle Tips by Burleson Consulting |
High Performance Data Warehousing
Inheritance
Not all classes within a generalization hierarchy will have objects
associated with them. The object-oriented paradigm allows for
abstraction, which means that a class may exist only for the purpose
of passing inherited data and behaviors. The classes vehicle and car
would probably not have any concrete objects, while objects within
the van class would inherit from the abstract vehicle and car
classes. Multiple inheritance is also demonstrated by the
amphibian_car class. Any instances of this class will inherit data
and behaviors from both the car and the boat classes.
It is important to note the tremendous difference between
one-to-many relationships and IS-A relationships. In the previous
example, this entire class hierarchy describes vehicles which are
associated with the item entity in the overall database. Class
hierarchies do not imply any data relationships between the classes.
While one customer may place many orders, it is not true that one
car may have many sedans.
Polymorphism
Polymorphism is the ability of different objects to receive the same
message and behave in different ways. This concept has many
parallels in the real world. An event such as a volcanic eruption
may have many different effects on living things in the area. The
poisonous gasses may kill all air-breathing animals while at the
same time nourish small marine organisms. In this scenario, the
single behavior of eruption has different effects on objects within
the animal class. Another analogy can be found in the business
world. For a personnel manager, the event of promotion will cause
different behaviors depending on the class of employee which
receives the promotion. Management objects will receive stock
options and country club memberships which are not offered to staff
objects.
Ronald Popeil was a master of polymorphism. Many folks remember the
heyday of Ronco and Popeil, where polymorphic products were
advertised at the national level. Consider the statement: It's a
hair cream AND a floor wax. If this is indeed true, the method
spread_it_on would invoke very different processes depending upon
whether we are applying the cream to a floor or a person's head.
This is an excerpt from "High Performance
Data Warehousing", copyright 1997.
 |
If you like Oracle tuning, you may enjoy the book
Oracle Tuning: The Definitive Reference , with over 900 pages of BC's favorite tuning
tips & scripts.
You can buy it directly from the publisher and save 30%, and get
instant access to the code depot of Oracle tuning scripts. |
|