正在加载图片...
Type Inheritance Suppose that we have the following type definition for people: create type Person (name varchar(20), address varchar(20)) Using inheritance to define the student and teacher types create type Student under Person (degree varchar(20), department varchar(20)) create type Teacher under Person (salary integer, department varchar(20)) ■ Subtypes can redefine methods by using overriding method in place of method in the method declaration Database System Concepts-7th Edition 29.12 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 29.12 ©Silberschatz, Korth and Sudarshan th Edition Type Inheritance ▪ Suppose that we have the following type definition for people: create type Person (name varchar(20), address varchar(20)) ▪ Using inheritance to define the student and teacher types create type Student under Person (degree varchar(20), department varchar(20)) create type Teacher under Person (salary integer, department varchar(20)) ▪ Subtypes can redefine methods by using overriding method in place of method in the method declaration
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有