Referential constraints on raw tables... are they
Posted in 2008
Topics: Triggers, Constraints & Referential Integrity
Hi everyone, Looking in the help for the _alter table_ command I read that a raw table is a "Nonlogging table that do not support primary key constraints or unique constraints. but that ___support referential constraints___, and can be indexed and updated". So because of this I suppose that it is possible to define a raw table with a column that "references" the column of another table. But when I try to alter a column to reference another I'm getting error "-297:Cannot find unique constraint or primary key on referenced table (<table-name>" and that are precisely the kind of constraints that are not allowed for raw tables. The questions is: - Am I miss-interpreting the documentation ? or there is a way to place a referential constraint on a raw table, different from an alter table? Any help would be appreciated. J.
Jean, TFM says: "RAW tables do not support indexes, referential constraints, or rollback." And indeed, if I try to create FK on such table: "19831: Indexes and referential constraints are not allowed on tables of type raw." And further: finderr 19831 "...You must alter the RAW table to a STANDARD table if you want to use indexes and referential constraints." Where did you find that info? Regards Davorin
> Where did you find that info?
I found it in "the fine manuals" ;)
The problem happen when I tried to alter a table to be raw:
alter table cco_carpla type( raw ) ;
And bam!! -19831 the same as you...
Then I double checked the documentation for the "alter table" command in the
on-line documentation site for IDS 11.5
http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp (that seems
to be down right now... maybe someone is checking... ;) )
In the segment for altering the type of a table it states that:
"Nonlogging table that do not support primary key constraints or unique
constraints. but that ___support referential constraints___, and can be
indexed and updated"
So it seems that while primary and unique constraints aren't allowed
referential ones are.
But as you found it seems that is not the case...
Just wondering if I miss-interpreted the documentation.
J.
PS: The on-line documentation site is down for me ... if later it becomes
available I'll search for the url and post it here.
2008/10/16 KREMENJAS <DAVORIN>
> Jean,
>
> TFM says: "RAW tables do not support indexes, referential constraints, or
> rollback."
>
> And indeed, if I try to create FK on such table:
>
> "19831: Indexes and referential constraints are not allowed on tables of
> type
> raw."
>
> And further:
>
> finderr 19831
>
> "...You must alter the RAW table to a STANDARD table if you want to use
> indexes and referential constraints."
>
> Where did you find that info?
>
> Regards
>
> Davorin
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Seems this time the fine manuals are out of sync ;)Not the case with
mr. Kremenjas.
Referential constraints are not allowed on raw tables.
J.
2008/10/16 Jean Sagi <jeansagi.ifx@gmail.com>
> > Where did you find that info?
> I found it in "the fine manuals" ;)
>
> The problem happen when I tried to alter a table to be raw:
>
> alter table cco_carpla type( raw ) ;>
> And bam!! -19831 the same as you...
>
> Then I double checked the documentation for the "alter table" command in
> the
> on-line documentation site for IDS 11.5
> http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp (that
> seems
> to be down right now... maybe someone is checking... ;) )
>
> In the segment for altering the type of a table it states that:
>
> "Nonlogging table that do not support primary key constraints or unique
> constraints. but that ___support referential constraints___, and can be
> indexed and updated"
>
> So it seems that while primary and unique constraints aren't allowed
> referential ones are.
>
> But as you found it seems that is not the case...
>
> Just wondering if I miss-interpreted the documentation.
>
> J.
>
> PS: The on-line documentation site is down for me ... if later it becomes
> available I'll search for the url and post it here.
>
> 2008/10/16 KREMENJAS <DAVORIN>
>
> > Jean,
> >
> > TFM says: "RAW tables do not support indexes, referential constraints, or
> > rollback."
> >
> > And indeed, if I try to create FK on such table:
> >
> > "19831: Indexes and referential constraints are not allowed on tables of
> > type
> > raw."
> >
> > And further:
> >
> > finderr 19831
> >
> > "...You must alter the RAW table to a STANDARD table if you want to use
> > indexes and referential constraints."
> >
> > Where did you find that info?
> >
> > Regards
> >
> > Davorin
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>