Is god is creating these new tables???????

Database
Enthusiast

Is god is creating these new tables???????

Hi folks, while working in teradata ,i executed the following script
Here im just creating Four tables ,But when i see the Database i found 3 more new tables

E_2_0, E_3_0 and E_4_0
I dono From where its created and i dono why its getting created .

Can anyone please explain the rational behind this..

CREATE TABLE E_1
(
a CHAR(18) NOT NULL
TITLE 'a' ,
b CHAR(18)
TITLE 'b'
)
UNIQUE PRIMARY INDEX XPKE_1
(
a
)
;

CREATE TABLE E_2
(
a CHAR(18) NOT NULL
TITLE 'a' ,
c CHAR(18)
TITLE 'c'
)
UNIQUE PRIMARY INDEX XPKE_2
(
a
)
;

CREATE TABLE E_3
(
a CHAR(18)
TITLE 'a' ,
d CHAR(18) NOT NULL
TITLE 'd'
)
UNIQUE PRIMARY INDEX XPKE_3
(
d
)
;

CREATE TABLE E_4
(
d CHAR(18) NOT NULL
TITLE 'd' ,
e CHAR(18)
TITLE 'e'
)
;

ALTER TABLE E_4
ADD CONSTRAINT XPKE_4 PRIMARY KEY (d)
;

ALTER TABLE E_2
ADD CONSTRAINT R_1 FOREIGN KEY (a) REFERENCES E_1(a)
;

ALTER TABLE E_3
ADD CONSTRAINT R_2 FOREIGN KEY (a) REFERENCES E_2(a)
;

ALTER TABLE E_4
ADD CONSTRAINT R_3 FOREIGN KEY (d) REFERENCES E_3(d)
;
2 REPLIES
Teradata Employee

Re: Is god is creating these new tables???????

Those "error tables" are created in the process of adding a referential constraint. See the explanation under ALTER TABLE in the SQL Reference.
Enthusiast

Re: Is god is creating these new tables???????

You can also "pray" to GOD not to create those error tables by using the "WITH CHECK OPTION" :-)

It's just that God won't grant your prayer if the child table has records which violate the RI constraint.