データを格納する表を作成します。news_tableに、分類するドキュメントが格納されます。news_categories表に、カテゴリおよびカテゴリを定義するルールが格納されます。news_id_cat表に、分類後のドキュメントIDおよび関連するカテゴリが格納されます。
create table news_table (
tk number primary key not null,
title varchar2(1000),
text clob);
create table news_categories (
queryid number primary key not null,
category varchar2(100),
query varchar2(2000));
create table news_id_cat (
tk number,
category_id number);