DDL FOR SUPERTYPE AND SUBTYPE ORACLE

200 Views Asked by At

I have an entity with supertype: tb_transaksi with attributes: id_transaksi (pk), tgl_transaksi and 2 subtypes, namely: debit_card with attribute: no_kartu and credit_card with attribute: persen_bunga.

But when I generate into DDL form an error occurs like this:

ERROR: No Discriminator Column found in Arc FKArc_1 - constraint trigger for Arc cannot be generated
ERROR: No Discriminator Column found in Arc FKArc_1 - constraint trigger for Arc cannot be generated

what do I have to do?

DDL STATEMENT :

CREATE TABLE cash ( id_transaksi NUMBER(10, 2) NOT NULL, nominal NUMBER(10, 2) NOT NULL );

ALTER TABLE cash ADD CONSTRAINT cash_pk PRIMARY KEY ( id_transaksi );

CREATE TABLE credit ( id_transaksi NUMBER(10, 2) NOT NULL, nomor_kartu NUMBER(10, 2) NOT NULL );

ALTER TABLE credit ADD CONSTRAINT credit_pk PRIMARY KEY ( id_transaksi );

CREATE TABLE tb_transaksi ( id_transaksi NUMBER(10, 2) NOT NULL );

ALTER TABLE tb_transaksi ADD CONSTRAINT tb_transaksi_pk PRIMARY KEY ( id_transaksi );

ALTER TABLE cash ADD CONSTRAINT cash_tb_transaksi_fk FOREIGN KEY ( id_transaksi ) REFERENCES tb_transaksi ( id_transaksi );

ALTER TABLE credit ADD CONSTRAINT credit_tb_transaksi_fk FOREIGN KEY ( id_transaksi ) REFERENCES tb_transaksi ( id_transaksi );

-- ERROR: No Discriminator Column found in Arc FKArc_1 - constraint trigger for Arc cannot be generated

-- ERROR: No Discriminator Column found in Arc FKArc_1 - constraint trigger for Arc cannot be generated

0

There are 0 best solutions below