db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: ALTER TABLE clauses in TCK schemas
Date Tue, 26 Jul 2005 15:29:36 GMT
Thanks for noticing this, Michael.  I will delete the REFERENCES part of 
the CREATE TABLE statements.  I added the ALTER TABLE statements in 
order to have a named constraint, so I want to keep those.

-- Michelle

Michael Watzek wrote:

> Hi Michelle,
>
> the TCK schemas for application identity and datastore indentity both 
> contain two "ALTER TABLE" statements on table "project_reviewer". I 
> think, both statements are redundant, because in the "CREATE TABLE" 
> statement of table "project_reviewer" column "PROJID" as well as 
> column "REVIEWER" have "REFERENCE" clauses already:
>
> CREATE TABLE project_reviewer (
>     PROJID INTEGER REFERENCES projects NOT NULL,
>     REVIEWER INTEGER REFERENCES persons NOT NULL
> );
>
> ALTER TABLE project_reviewer
>     ADD CONSTRAINT PR_PROJ_FK FOREIGN KEY
>         (PROJID) REFERENCES projects(PROJID);
>
> ALTER TABLE project_reviewer
>     ADD CONSTRAINT PR_REV_FK FOREIGN KEY
>         (REVIEWER) REFERENCES persons(PERSONID);
>
> For this reason, I suggest to delete both "ALTER TABLE" statements.
>
> Regards,
> Michael



Mime
View raw message