db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r615074 - in /db/jdo/trunk/tck2/src: conf/ orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/ orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/ sql/derby/applicationidentity/ sql/derby/datastoreidentity/
Date Thu, 24 Jan 2008 22:56:51 GMT
Author: mcaisse
Date: Thu Jan 24 14:56:48 2008
New Revision: 615074

URL: http://svn.apache.org/viewvc?rev=615074&view=rev
Log:
JDO-564

Added:
    db/jdo/trunk/tck2/src/conf/companyOverrideAnnotatedAllRelationshipsFCPM.conf
    db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/
    db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
  (with props)
    db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/
    db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
  (with props)
    db/jdo/trunk/tck2/src/sql/derby/applicationidentity/schema11.sql
    db/jdo/trunk/tck2/src/sql/derby/datastoreidentity/schema11.sql
Modified:
    db/jdo/trunk/tck2/src/conf/configurations.list

Added: db/jdo/trunk/tck2/src/conf/companyOverrideAnnotatedAllRelationshipsFCPM.conf
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/companyOverrideAnnotatedAllRelationshipsFCPM.conf?rev=615074&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/conf/companyOverrideAnnotatedAllRelationshipsFCPM.conf (added)
+++ db/jdo/trunk/tck2/src/conf/companyOverrideAnnotatedAllRelationshipsFCPM.conf Thu Jan 24
14:56:48 2008
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+jdo.tck.description = Completeness test with mapping 11 overriding annotations, basic testdata
with all relationships \
+and embedded objects, annotations. 
+jdo.tck.mapping.companyfactory = org.apache.jdo.tck.pc.companyAnnotatedFC.CompanyFactoryAnnotatedFCPMDelegator
+jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
+jdo.tck.mapping = 11
+jdo.tck.requiredOptions =

Modified: db/jdo/trunk/tck2/src/conf/configurations.list
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/configurations.list?rev=615074&r1=615073&r2=615074&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/configurations.list (original)
+++ db/jdo/trunk/tck2/src/conf/configurations.list Thu Jan 24 14:56:48 2008
@@ -58,6 +58,7 @@
                  companyAnnotatedEmbeddedJPAPM.conf \
                  companyAnnotatedNoRelationshipsPCPM.conf \
                  companyAnnotatedNoRelationshipsPIPM.conf \
+                 companyOverrideAnnotatedAllRelationshipsFCPM.conf \
                  inheritance1.conf \
                  inheritance2.conf \
                  inheritance3.conf \

Added: db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm?rev=615074&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
(added)
+++ db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
Thu Jan 24 14:56:48 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<orm xmlns="http://java.sun.com/xml/ns/jdo/orm"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm 
+	http://java.sun.com/xml/ns/jdo/orm_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+    <package name="org.apache.jdo.tck.pc.companyAnnotatedFC">
+
+        <!-- changed table name -->
+        <class name="FCAppDepartment" table="comp_depts">
+        </class>
+
+        <class name="FCAppProject">
+            <inheritance>
+                <!-- changed discriminator column name -->
+                <discriminator column="CLASS"/>
+            </inheritance>
+            <field name="budget">
+                <!-- changed column name -->
+               <column name="PROJECT_BUDGET"/>
+            </field>
+        </class>
+
+    </package>
+</orm>

Propchange: db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm?rev=615074&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
(added)
+++ db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
Thu Jan 24 14:56:48 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<orm xmlns="http://java.sun.com/xml/ns/jdo/orm"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm 
+	http://java.sun.com/xml/ns/jdo/orm_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+    <package name="org.apache.jdo.tck.pc.companyAnnotatedFC">
+
+        <!-- changed table name -->
+        <class name="FCDSDepartment" table="comp_depts">
+        </class>
+
+        <class name="FCDSProject">
+            <inheritance>
+                <!-- changed discriminator column name -->
+                <discriminator column="CLASS"/>
+            </inheritance>
+            <field name="budget">
+                <!-- changed column name -->
+               <column name="PROJECT_BUDGET"/>
+            </field>
+        </class>
+
+    </package>
+</orm>

Propchange: db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/companyAnnotatedFC/package-standard11.orm
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/sql/derby/applicationidentity/schema11.sql
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/sql/derby/applicationidentity/schema11.sql?rev=615074&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/sql/derby/applicationidentity/schema11.sql (added)
+++ db/jdo/trunk/tck2/src/sql/derby/applicationidentity/schema11.sql Thu Jan 24 14:56:48 2008
@@ -0,0 +1,156 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+-- SchemaType: application identity
+
+connect 'jdbc:derby:jdotckdb;create=true' user 'tckuser' password 'tckuser';
+
+CREATE SCHEMA applicationidentity11;
+SET SCHEMA applicationidentity11;
+
+-------------------------
+-- company
+-------------------------
+
+ALTER TABLE comp_depts DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE comp_depts DROP CONSTRAINT DEPTS_COMP_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_REV_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_DEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_FUNDDEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MANAGER_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MENTOR_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_HRADVISOR_FK;
+ALTER TABLE insuranceplans DROP CONSTRAINT INS_EMP_FK;
+DROP TABLE insuranceplans;
+DROP TABLE project_reviewer;
+DROP TABLE project_member;
+DROP TABLE employee_phoneno_type;
+DROP TABLE persons;
+DROP TABLE projects;
+DROP TABLE comp_depts;
+DROP TABLE companies;
+
+CREATE TABLE companies (
+    ID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    FOUNDEDDATE TIMESTAMP NOT NULL,
+    ADDRID INTEGER,
+    STREET VARCHAR(64),
+    CITY VARCHAR(64),
+    STATE CHAR(2),
+    ZIPCODE CHAR(5),
+    COUNTRY VARCHAR(64),
+    DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT COMPS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE comp_depts (
+    ID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    EMP_OF_THE_MONTH INTEGER,
+    COMPANYID INTEGER,
+    DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT DEPTS_COMP_FK FOREIGN KEY (COMPANYID) REFERENCES companies,
+    CONSTRAINT DEPTS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE persons (
+    PERSONID INTEGER NOT NULL,
+    FIRSTNAME VARCHAR(32) NOT NULL,
+    LASTNAME VARCHAR(32) NOT NULL,
+    MIDDLENAME VARCHAR(32),
+    BIRTHDATE TIMESTAMP NOT NULL,
+    ADDRID INTEGER,
+    STREET VARCHAR(64),
+    CITY VARCHAR(64),
+    STATE CHAR(2),
+    ZIPCODE CHAR(5),
+    COUNTRY VARCHAR(64),
+    HIREDATE TIMESTAMP,
+    WEEKLYHOURS REAL,
+    DEPARTMENT INTEGER,
+    FUNDINGDEPT INTEGER,
+    MANAGER INTEGER,
+    MENTOR INTEGER,
+    HRADVISOR INTEGER,
+    SALARY REAL,
+    WAGE REAL,
+    DISCRIMINATOR varchar(255) NOT NULL,
+    CONSTRAINT PERS_DEPT_FK FOREIGN KEY (DEPARTMENT) REFERENCES comp_depts,
+    CONSTRAINT PERS_FUNDDEPT_FK FOREIGN KEY (FUNDINGDEPT) REFERENCES comp_depts,
+    CONSTRAINT PERS_MANAGER_FK FOREIGN KEY (MANAGER) REFERENCES persons,
+    CONSTRAINT PERS_MENTOR_FK FOREIGN KEY (MENTOR) REFERENCES persons,
+    CONSTRAINT PERS_HRADVISOR_FK FOREIGN KEY (HRADVISOR) REFERENCES persons,
+    CONSTRAINT EMPS_PK PRIMARY KEY (PERSONID)
+);
+
+CREATE TABLE insuranceplans (
+    INSID INTEGER NOT NULL,
+    CARRIER VARCHAR(64) NOT NULL,
+    LIFETIME_ORTHO_BENEFIT DECIMAL(22,3),
+    PLANTYPE VARCHAR(8),
+    DISCRIMINATOR varchar(255) NOT NULL,
+    EMPLOYEE INTEGER,
+    CONSTRAINT INS_EMP_FK FOREIGN KEY (EMPLOYEE) REFERENCES persons,
+    CONSTRAINT INS_PK PRIMARY KEY (INSID)
+);
+
+CREATE TABLE projects (
+    PROJID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    PROJECT_BUDGET DECIMAL(11,2) NOT NULL,
+    CLASS VARCHAR(255),
+    CONSTRAINT PROJS_PK PRIMARY KEY (PROJID)
+);
+
+CREATE TABLE project_reviewer (
+    PROJID INTEGER NOT NULL,
+    REVIEWER INTEGER NOT NULL
+);
+
+CREATE TABLE project_member (
+    PROJID INTEGER REFERENCES projects NOT NULL,
+    MEMBER INTEGER REFERENCES persons NOT NULL
+);
+
+CREATE TABLE employee_phoneno_type (
+    EMPID INTEGER REFERENCES persons NOT NULL,
+    PHONENO VARCHAR(16) NOT NULL,
+    TYPE VARCHAR(16) 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);
+
+ALTER TABLE project_member 
+    ADD CONSTRAINT PM_PROJ_FK FOREIGN KEY
+        (PROJID) REFERENCES projects;
+
+ALTER TABLE project_member 
+    ADD CONSTRAINT PM_MEMB_FK FOREIGN KEY
+        (MEMBER) REFERENCES persons;
+
+
+ALTER TABLE comp_depts 
+    ADD CONSTRAINT EMP_MO_FK FOREIGN KEY
+        (EMP_OF_THE_MONTH) REFERENCES persons(PERSONID) ON DELETE SET NULL;
+
+disconnect;

Added: db/jdo/trunk/tck2/src/sql/derby/datastoreidentity/schema11.sql
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/sql/derby/datastoreidentity/schema11.sql?rev=615074&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/sql/derby/datastoreidentity/schema11.sql (added)
+++ db/jdo/trunk/tck2/src/sql/derby/datastoreidentity/schema11.sql Thu Jan 24 14:56:48 2008
@@ -0,0 +1,162 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+-- SchemaType: datastore identity
+
+connect 'jdbc:derby:jdotckdb;create=true' user 'tckuser' password 'tckuser';
+
+CREATE SCHEMA datastoreidentity11;
+SET SCHEMA datastoreidentity11;
+
+-------------------------
+-- company
+-------------------------
+
+ALTER TABLE comp_depts DROP CONSTRAINT EMP_MO_FK;
+ALTER TABLE comp_depts DROP CONSTRAINT DEPTS_COMP_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_PROJ_FK;
+ALTER TABLE project_reviewer DROP CONSTRAINT PR_REV_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_DEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_FUNDDEPT_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MANAGER_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_MENTOR_FK;
+ALTER TABLE persons DROP CONSTRAINT PERS_HRADVISOR_FK;
+ALTER TABLE insuranceplans DROP CONSTRAINT INS_EMP_FK;
+DROP TABLE insuranceplans;
+DROP TABLE project_reviewer;
+DROP TABLE project_member;
+DROP TABLE employee_phoneno_type;
+DROP TABLE persons;
+DROP TABLE projects;
+DROP TABLE comp_depts;
+DROP TABLE companies;
+
+CREATE TABLE companies (
+    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    ID INTEGER,
+    NAME VARCHAR(32) NOT NULL,
+    FOUNDEDDATE TIMESTAMP NOT NULL,
+    ADDRID INTEGER,
+    STREET VARCHAR(64),
+    CITY VARCHAR(64),
+    STATE CHAR(2),
+    ZIPCODE CHAR(5),
+    COUNTRY VARCHAR(64),
+    DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT COMPS_PK PRIMARY KEY (DATASTORE_IDENTITY)
+);
+
+CREATE TABLE comp_depts (
+    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    ID INTEGER,
+    NAME VARCHAR(32) NOT NULL,
+    EMP_OF_THE_MONTH INTEGER,
+    COMPANYID INTEGER,
+    DISCRIMINATOR VARCHAR(255),
+    CONSTRAINT DEPTS_COMP_FK FOREIGN KEY (COMPANYID) REFERENCES companies,
+    CONSTRAINT DEPTS_PK PRIMARY KEY (DATASTORE_IDENTITY)
+);
+
+CREATE TABLE persons (
+    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    PERSONID INTEGER NOT NULL,
+    FIRSTNAME VARCHAR(32) NOT NULL,
+    LASTNAME VARCHAR(32) NOT NULL,
+    MIDDLENAME VARCHAR(32),
+    BIRTHDATE TIMESTAMP NOT NULL,
+    ADDRID INTEGER,
+    STREET VARCHAR(64),
+    CITY VARCHAR(64),
+    STATE CHAR(2),
+    ZIPCODE CHAR(5),
+    COUNTRY VARCHAR(64),
+    HIREDATE TIMESTAMP,
+    WEEKLYHOURS REAL,
+    DEPARTMENT INTEGER,
+    FUNDINGDEPT INTEGER,
+    MANAGER INTEGER,
+    MENTOR INTEGER,
+    HRADVISOR INTEGER,
+    SALARY REAL,
+    WAGE REAL,
+    DISCRIMINATOR varchar(255) NOT NULL,
+    CONSTRAINT PERS_DEPT_FK FOREIGN KEY (DEPARTMENT) REFERENCES comp_depts,
+    CONSTRAINT PERS_FUNDDEPT_FK FOREIGN KEY (FUNDINGDEPT) REFERENCES comp_depts,
+    CONSTRAINT PERS_MANAGER_FK FOREIGN KEY (MANAGER) REFERENCES persons,
+    CONSTRAINT PERS_MENTOR_FK FOREIGN KEY (MENTOR) REFERENCES persons,
+    CONSTRAINT PERS_HRADVISOR_FK FOREIGN KEY (HRADVISOR) REFERENCES persons,
+    CONSTRAINT PERS_UK UNIQUE (PERSONID),
+    CONSTRAINT PERS_PK PRIMARY KEY (DATASTORE_IDENTITY)
+);
+
+CREATE TABLE insuranceplans (
+    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    INSID INTEGER,
+    CARRIER VARCHAR(64) NOT NULL,
+    LIFETIME_ORTHO_BENEFIT DECIMAL(22,3),
+    PLANTYPE VARCHAR(8),
+    DISCRIMINATOR varchar(255) NOT NULL,
+    EMPLOYEE INTEGER,
+    CONSTRAINT INS_EMP_FK FOREIGN KEY (EMPLOYEE) REFERENCES persons,
+    CONSTRAINT INS_PK PRIMARY KEY (DATASTORE_IDENTITY)
+);
+
+CREATE TABLE projects (
+    DATASTORE_IDENTITY INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    PROJID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    PROJECT_BUDGET DECIMAL(11,2) NOT NULL,
+    CLASS VARCHAR(255),
+    CONSTRAINT PROJS_UK UNIQUE (PROJID),
+    CONSTRAINT PROJS_PK PRIMARY KEY (DATASTORE_IDENTITY)
+);
+
+CREATE TABLE project_reviewer (
+    PROJID INTEGER NOT NULL,
+    REVIEWER INTEGER NOT NULL
+);
+
+CREATE TABLE project_member (
+    PROJID INTEGER NOT NULL,
+    MEMBER INTEGER NOT NULL
+);
+
+CREATE TABLE employee_phoneno_type (
+    EMPID INTEGER REFERENCES persons NOT NULL,
+    PHONENO VARCHAR(16) NOT NULL,
+    TYPE VARCHAR(16) NOT NULL
+);
+
+ALTER TABLE project_reviewer 
+    ADD CONSTRAINT PR_PROJ_FK FOREIGN KEY
+        (PROJID) REFERENCES projects;
+
+ALTER TABLE project_reviewer 
+    ADD CONSTRAINT PR_REV_FK FOREIGN KEY
+        (REVIEWER) REFERENCES persons;
+
+ALTER TABLE project_member 
+    ADD CONSTRAINT PM_PROJ_FK FOREIGN KEY
+        (PROJID) REFERENCES projects;
+
+ALTER TABLE project_member 
+    ADD CONSTRAINT PM_MEMB_FK FOREIGN KEY
+        (MEMBER) REFERENCES persons;
+
+ALTER TABLE comp_depts 
+    ADD CONSTRAINT EMP_MO_FK FOREIGN KEY
+        (EMP_OF_THE_MONTH) REFERENCES persons ON DELETE SET NULL;
+
+disconnect;



Mime
View raw message