I was trying to create this table called PAIS that is nested to tables that store only abstract data types. The problem is when I execute this script in oracle it gives me warning in the data type row_exp and in others not. Therefore, when creating the PAIS table, it does not leave me because row_exp is a non-valid data type, it tells me with the message "invalid data type".
I think this error is due to the fact that within exp I have a data type attribute type_value that is also an ADT. How could I solve this?
create or replace type tipo_valor as OBJECT(
ano int,
valor int
);/
create or replace type exp as OBJECT(
tipovalor tipo_valor,
pais varchar2(30)
);/
create or replace type moneda as OBJECT(
nombre varchar2(20),
simbolo varchar2(10)
);/
create or replace type fila_tipo_valor as table of tipo_valor;/
create or replace type fila_exp as table of exp;/
create table PAIS (
id int,
nombre varchar2(20),
continente varchar2(20),
superficie fila_tipo_valor,
produccion fila_tipo_valor,
exp_ano fila_exp,
moneda moneda,
descripcion varchar2(200)
) nested table exp_ano store as exp_ano_pais,
nested table produccion store as produccion_pais,
nested table superficie store as superficie_pais;