);
CREATE TABLE no_inconcl_aux (
source varchar(255) binary not null,
- no tinyint(4) not null
+ no smallint(6) not null
);
CREATE TABLE no_concl_hyp (
source varchar(255) binary not null,
- no tinyint(4) not null
+ no smallint(6) not null
+);
+CREATE TABLE no_hyp (
+ source varchar(255) binary unique not null,
+ no smallint(6) not null
+);
+CREATE TABLE owners (
+ source varchar(255) binary not null,
+ owner varchar(255) binary not null
);
CREATE INDEX refObj_source ON refObj (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);
+CREATE INDEX no_hyp_no ON no_hyp (no);
+CREATE INDEX no_hyp_source ON no_hyp (source);
+CREATE INDEX owners_owner ON owners (owner);
+CREATE INDEX owners_source ON owners (source);
--- /dev/null
+
+-- table mapping sources to number of distinct constants occurring in hypothesis
+INSERT INTO no_hyp
+SELECT source, COUNT(DISTINCT h_occurrence)
+FROM refObj
+WHERE (h_position="http://www.cs.unibo.it/helm/schemas/schema-helm#MainHypothesis"
+ OR h_position="http://www.cs.unibo.it/helm/schemas/schema-helm#InHypothesis")
+GROUP BY source;
+
+INSERT IGNORE INTO no_hyp
+SELECT source, 0
+FROM refObj
+WHERE NOT (h_position="http://www.cs.unibo.it/helm/schemas/schema-helm#MainHypothesis"
+ OR h_position="http://www.cs.unibo.it/helm/schemas/schema-helm#InHypothesis")
+GROUP BY source;