diff options
author | Jochen Topf <jochen@topf.org> | 2015-02-26 15:41:23 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2015-02-26 15:41:23 +0100 |
commit | 4a2073856b3ca10b61c158a12cc36aaaf8842f46 (patch) | |
tree | 5a31a736950594e3e66fe1586b3677d5d9fdbc52 /sources/db/pre.sql | |
parent | 0ebe372964cdbb3a1caec14699bdcb0c43c0eafe (diff) | |
download | taginfo-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.sql | 12 |
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 ( |