Question on Primary and Foriegn key constraints (Composite) ...
We are working on Oracle 11g. We have 3 Tables A,B and C. C has an identifying foreign relationship with A and C has a non-identifying foreign relationship with B. A does not have any relationship to B. We have modeled that in Case tool and have the following scripts for table definition.
/* Create A*/
CREATE TABLE A
(
CLIENT_ID NUMBER (10) NOT NULL ,
ELEMENT_ID NUMBER (10) NOT NULL ,
A_DESC VARCHAR2 (10) ,
A_NUMBER NUMBER (10)
)
;
ALTER TABLE A
ADD CONSTRAINT A_PK PRIMARY KEY ( CLIENT_ID, ELEMENT_ID) ;
/* Create B*/
CREATE TABLE B
(
CLIENT_ID NUMBER (10) NOT NULL ,
CALENDAR_ID NUMBER (10) NOT NULL ,