Object-Oriented Databases Need for Complex Data Types - CWI
Object-Oriented Databases Need for Complex Data Types - CWI
Object-Oriented Databases Need for Complex Data Types - CWI
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Data</strong>base System Concepts<br />
<strong>Data</strong>base System Concepts<br />
Inheritance (Cont.)<br />
Place classes into a specialization/IS-A hierarchy<br />
variables/messages belonging to class person are<br />
inherited by class employee as well as customer<br />
Result is a class hierarchy<br />
Note analogy with ISA Hierarchy in the E-R model<br />
.<br />
8.9<br />
Class Hierarchy Definition<br />
class person{<br />
string name;<br />
string address:<br />
};<br />
class customer isa person {<br />
int credit-rating;<br />
};<br />
class employee isa person {<br />
date start-date;<br />
int salary;<br />
};<br />
class officer isa employee {<br />
int office-number,<br />
int expense-account-number,<br />
};<br />
8.10<br />
©Silberschatz, Korth and Sudarshan<br />
©Silberschatz, Korth and Sudarshan<br />
5