[Tagdb] SQL Queries for "relatedness" of tags
Joshua Lippiner
jlippiner at yahoo.com
Sun Aug 20 01:06:42 GMT 2006
I just read the relatedness article on Tagschema about users, ideas and
tags. While interesting, I am still failing to see the SQL translation of
this analysis.
I have two tables:
USERS (user_id, username)
TAGS (tag_id, user_id, tag)
What I need to do is find all users with similar tags to the user I care
about. So assume that I am looking at User A's tags and I want to query the
database to find all users with tags LIKE User A. What I clearly need to do
(simplistically speaking) is find all users with all User A's tags, then all
user's with All-1, All-2, All-3, etc until I reached the max number of users
that I want. Technically, I would also want to "rank" each tag with some
weight so tags that are used less often that User A has in common with
others is worth more then common tags, but I want to leave that out of it
for now.
Ideally I would like to be able to create a SQL query that can be run as
called by the user instead of running some form of a batch process.
How are others tackling this problem? It also applies to anything else that
might be tagged other then users (e.g. items, whatever).
Thank you for your suggestions.
Josh Lippiner
IdeaDisco.com - Express yourself (c) Coming Soon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://nelson.textdrive.com/pipermail/tagdb/attachments/20060820/27ef6514/attachment.htm
More information about the Tagdb
mailing list