- let conclno_tbl = MetadataTypes.conclno_tbl () in
- let conclno_hyp_tbl = MetadataTypes.conclno_hyp_tbl () in
- let statements = [
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- h_occurrence varchar(255) binary not null,
- h_position varchar(255) binary not null,
- h_depth integer
- );" obj_tbl;
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- h_position varchar(255) binary not null,
- h_depth integer not null,
- h_sort varchar(255) binary not null
- );" sort_tbl;
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- h_position varchar(255) binary not null,
- h_depth integer not null
- );" rel_tbl;
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- value varchar(255) binary not null
- );" name_tbl;
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- no tinyint(4) not null
- );" conclno_tbl;
- sprintf "CREATE TABLE %s (
- source varchar(255) binary not null,
- no tinyint(4) not null
- );" conclno_hyp_tbl ] in
-(*
-CREATE INDEX refObj_source ON refObj (source);
-CREATE INDEX refObj_target ON refObj (h_occurrence);
-CREATE INDEX refObj_position ON refObj (h_position);
-CREATE INDEX refSort_source ON refSort (source);
-CREATE INDEX objectName_value ON objectName (value);
-CREATE INDEX no_inconcl_aux_source ON no_inconcl_aux (source);
-CREATE INDEX no_inconcl_aux_no ON no_inconcl_aux (no);
-CREATE INDEX no_concl_hyp_source ON no_concl_hyp (source);
-CREATE INDEX no_concl_hyp_no ON no_concl_hyp (no);
-*)
+ let count_tbl = MetadataTypes.count_tbl () in
+ let tbls = [
+ (obj_tbl,`RefObj) ; (sort_tbl,`RefSort) ; (rel_tbl,`RefRel) ;
+ (name_tbl,`ObjectName) ; (count_tbl,`Count) ]
+ in
+ let statements =
+ (SqlStatements.create_tables tbls) @ (SqlStatements.create_indexes tbls)
+ in