summaryrefslogtreecommitdiff
path: root/sources/db/pre.sql
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2015-02-26 15:41:23 +0100
committerJochen Topf <jochen@topf.org>2015-02-26 15:41:23 +0100
commit4a2073856b3ca10b61c158a12cc36aaaf8842f46 (patch)
tree5a31a736950594e3e66fe1586b3677d5d9fdbc52 /sources/db/pre.sql
parent0ebe372964cdbb3a1caec14699bdcb0c43c0eafe (diff)
downloadtaginfo-4a2073856b3ca10b61c158a12cc36aaaf8842f46.tar
taginfo-4a2073856b3ca10b61c158a12cc36aaaf8842f46.tar.gz
Add similarity program to check for similar keys.
This adds the 'similarity' program that checks for similar keys in the taginfo-db database. It is not run yet by the update script, but the supporting database tables etc. are added by this commit.
Diffstat (limited to 'sources/db/pre.sql')
-rw-r--r--sources/db/pre.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/db/pre.sql b/sources/db/pre.sql
index 1c752be..586fe6c 100644
--- a/sources/db/pre.sql
+++ b/sources/db/pre.sql
@@ -49,6 +49,18 @@ CREATE TABLE key_distributions (
png BLOB
);
+
+DROP TABLE IF EXISTS similar_keys;
+
+CREATE TABLE similar_keys (
+ key1 VARCHAR,
+ key2 VARCHAR,
+ count_all1 INTEGER DEFAULT 0,
+ count_all2 INTEGER DEFAULT 0,
+ similarity INTEGER
+);
+
+
DROP TABLE IF EXISTS tag_distributions;
CREATE TABLE tag_distributions (