1

Topic: The objective tables

Good afternoon;
During knowledge of the objective possibilities of Oraklo there was a bewilderment:
Admit I to create type
create or replace type t_People as object
(
nPassport number;
sFIO varchar2 (50)
) not final
I inherit from it other type
create or replace type t_student under t_People
(
nStudID number
) final
I create from type t_student the objective table
create table students of t_student
(constraint pk1 primary key (nStudID)) OBJECT IDENTIFIER IS PRIMARY KEY
As a result I receive the table with three attributes: nPassport, sFIO, nStudID
I delete attribute sFIO from super type
alter type t_people drop attribute (sFIO) cascade;
Removal from super type transits successfully, but... I look the table - on former 3 :nPassport, sFIO, nStudID.
I try to delete manually from the table (alter table... drop column.) - the Error ora-12981! Removal of a column from the table of the objective type Is impossible.
Too most and with adding of attributes in super type - in the objective tables of descendants they are not added
Question. How with it to live that? For certain there should be a possibility to control attributes of the objective tables which came through super types well or at least how to delete a column in that case?)))

2

Re: The objective tables

The version? It is not played back:

SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE 12.2.0.1.0 Production
TNS for 64-bit Windows: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
SQL> create or replace type t_People as object
2 (
3 nPassport number;
4 sFIO varchar2 (50)
5) not final
6 /
Type created.
SQL> create or replace type t_student under t_People
2 (
3 nStudID number
4) final
5 /
Type created.
SQL> create table students of t_student
2 (constraint pk1 primary key (nStudID)) OBJECT IDENTIFIER IS PRIMARY KEY
3 /
Table created.
SQL> desc students
Name Null? Type
------------------------------------------------------------------------ -------- -------------------------------------------------
NPASSPORT NUMBER
SFIO VARCHAR2 (50)
NSTUDID NOT NULL NUMBER
SQL> alter type t_people drop attribute (sFIO) cascade;
Type altered.
SQL> desc students
Name Null? Type
------------------------------------------------------------------------ -------- -------------------------------------------------
NPASSPORT NUMBER
NSTUDID NOT NULL NUMBER
SQL>

SY.