SAY --- Installing UdmSearch Data Base Objects for miulti DB mode

AUTOCOMMIT OFF
/
IF $RC (EXISTS TABLE dict10) <> 0
THEN
    BEGIN
/
CREATE TABLE dict10 (
       word                 VARCHAR(10) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict10_url_ind ON dict10
(
       url_id
)
/
CREATE INDEX dict10_word_ind ON dict10
(
    word
)
/
END
/
IF $RC (EXISTS TABLE dict11) <> 0
THEN
    BEGIN
/
CREATE TABLE dict11 (
       word                 VARCHAR(11) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict11_url_ind ON dict11
(
       url_id
)
/
CREATE INDEX dict11_word_ind ON dict11
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict12) <> 0
THEN
    BEGIN
/
CREATE TABLE dict12 (
       word                 VARCHAR(12) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict12_url_ind ON dict12
(
       url_id
)
/
CREATE INDEX dict12_word_ind ON dict12
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict16) <> 0
THEN
    BEGIN
/
CREATE TABLE dict16 (
       word                 VARCHAR(16) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict16_url_ind ON dict16
(
       url_id
)
/
CREATE INDEX dict16_word_ind ON dict16
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict2) <> 0
THEN
    BEGIN
/
CREATE TABLE dict2 (
       word                 VARCHAR(2) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict2_url_ind ON dict2
(
       url_id
)
/
CREATE INDEX dict2_word_ind ON dict2
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict3) <> 0
THEN
    BEGIN
/
CREATE TABLE dict3 (
       word                 VARCHAR(3) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict3_url_ind ON dict3
(
       url_id
)
/
CREATE INDEX dict3_word_ind ON dict3
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict32) <> 0
THEN
    BEGIN
/
CREATE TABLE dict32 (
       word                 VARCHAR(32) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict32_url_ind ON dict32
(
       url_id
)
/
CREATE INDEX dict32_word_ind ON dict32
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict4) <> 0
THEN
    BEGIN
/
CREATE TABLE dict4 (
       word                 VARCHAR(4) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict4_url_ind ON dict4
(
       url_id
)
/
CREATE INDEX dict4_word_ind ON dict4
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict5) <> 0
THEN
    BEGIN
/
CREATE TABLE dict5 (
       word                 VARCHAR(5) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict5_url_ind ON dict5
(
       url_id
)
/
CREATE INDEX dict5_word_ind ON dict5
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict6) <> 0
THEN
    BEGIN
/
CREATE TABLE dict6 (
       word                 VARCHAR(6) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict6_url_ind ON dict6
(
       url_id
)
/
CREATE INDEX dict6_word_ind ON dict6
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict7) <> 0
THEN
    BEGIN
/
CREATE TABLE dict7 (
       word                 VARCHAR(7) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict7_url_ind ON dict7
(
       url_id
)
/
CREATE INDEX dict7_word_ind ON dict7
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict8) <> 0
THEN
    BEGIN
/
CREATE TABLE dict8 (
       word                 VARCHAR(8) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict8_url_ind ON dict8
(
       url_id
)
/
CREATE INDEX dict8_word_ind ON dict8
(
       word
)
/
END
/
IF $RC (EXISTS TABLE dict9) <> 0
THEN
    BEGIN
/
CREATE TABLE dict9 (
       word                 VARCHAR(9) NOT NULL,
       url_id               FIXED(12) NOT NULL,
       intag                FIXED(2) NOT NULL
)
/
CREATE INDEX dict9_url_ind ON dict9
(
       url_id
)
/
CREATE INDEX dict9_word_ind ON dict9
(
       word
)
/
END
/
COMMIT
