Subject Re: Implementation limit exceeded
Author Daniel
--- In firebird-support@yahoogroups.com, Dmitry Yemanov <dimitr@...>
> Dmitry wrote:
> Did you show us all the fields in these three tables, including
> irrelevant ones?

Hi Dimity

Sorry I am answering so late, was in two meetings.
No, I deleted the irrelevant fields for simplicity. Please find below
the DDL generated via FlameRobin.

Best regards
Daniel
-----------------------------------------------

CREATE TABLE RELATION(
KEYWORDID ID NOT NULL,
ORIGINATINGOBJECTID Numeric(18,0),
RELATEDOBJECTID Numeric(18,0),
TARGETNAME Varchar(80),
ROLEID Smallint NOT NULL,
DESCRIPTIONID Smallint,
STARTDATE Date,
ENDDATE Date,
NOTE Varchar(32000),
NOTEPRIVATE Varchar(32000),
PERCENTAGE Decimal(5,2),
BFLAG Smallint DEFAULT 0,
DATAEXCHANGEKEY DEK,
DATAEXCHANGEDATE Timestamp,
CODE Varchar(12),
PRIMARY KEY (KEYWORDID)
);
ALTER TABLE RELATION ADD CONSTRAINT FK_RELATION_REF_26879_SYS_11
FOREIGN KEY (ORIGINATINGOBJECTID) REFERENCES SYS_KEYWORD
(KEYWORDID) ON DELETE CASCADE;
ALTER TABLE RELATION ADD CONSTRAINT FK_RELATION_REF_26879_SYS_KEYW
FOREIGN KEY (RELATEDOBJECTID) REFERENCES SYS_KEYWORD (KEYWORDID) ON
DELETE CASCADE;
ALTER TABLE RELATION ADD CONSTRAINT FK_RELATION_REF_95400_RELATION
FOREIGN KEY (ROLEID) REFERENCES RELATIONROLE_OLU (ID);
ALTER TABLE RELATION ADD CONSTRAINT FK_RELATION_REF_95404_RELATION
FOREIGN KEY (DESCRIPTIONID) REFERENCES RELATIONDESCRIPTION_OLU (ID);
ALTER TABLE RELATION ADD CONSTRAINT FK_RELATION_REF_95626_SYS_KEYW
FOREIGN KEY (KEYWORDID) REFERENCES SYS_KEYWORD (KEYWORDID) ON
DELETE CASCADE;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON RELATION TO "NETWORK" WITH GRANT OPTION;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON RELATION TO "SYSDBA" WITH GRANT OPTION;
----------------------------------------------------------

CREATE TABLE SYS_KEYWORD(
KEYWORDID ID NOT NULL,
FULLNAME Varchar(100),
ENTITYCLASSID Numeric(18,0),
DATAEXCHANGEKEY DEK,
PRIMARY KEY (KEYWORDID)
);
ALTER TABLE SYS_KEYWORD ADD CONSTRAINT FK_SYS_KEYW_REF_SYS_ENTITYCLS
FOREIGN KEY (ENTITYCLASSID) REFERENCES SYS_ENTITYCLASS_LU (ID);
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON SYS_KEYWORD TO "NETWORK" WITH GRANT OPTION;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON SYS_KEYWORD TO "SYSDBA" WITH GRANT OPTION;
----------------------------------------------------------

CREATE TABLE SYS_ENTITYCLASS_LU(
ID Numeric(18,0) NOT NULL,
NAME Varchar(1600),
NAMEUI Varchar(250),
TABLEID Smallint NOT NULL,
PRIMARY KEY (ID)
);
ALTER TABLE SYS_ENTITYCLASS_LU ADD CONSTRAINT
FK_SYS_ENTI_REF_26695_SYS_TABL
FOREIGN KEY (TABLEID) REFERENCES SYS_TABLE_LU (ID);
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON SYS_ENTITYCLASS_LU TO "NETWORK" WITH GRANT OPTION;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON SYS_ENTITYCLASS_LU TO "SYSDBA" WITH GRANT OPTION;
----------------------------------------------------------