[dev] Tags and Oscar

Duck duck at obala.net
Tue Sep 18 09:35:31 UTC 2007


On Sunday 16 of September 2007 22:27:09 Michael Rubinsky wrote:
> Wanted to start a discussion regarding the way tags are or will be
> implemented in Oscar.  Currently they are flat, each video's tags
> store with the video's information in the db row.  This has the
> benefit of allowing us to include recency information in the tag
> cloud, since we have to search each record for the tags anyway.
>
> I'd like to get thoughts on normalizing the oscar_videos table such
> that we have a oscar_tags table and a oscar_video_tags table.  I don't
> have a strong opinion as to which is better for Oscar, but I'm
> wondering if the normalized tables would be more efficient for things
> like finding related tags (we wouldn't have to search each row of the
> oscar_videos table for tag information...with mulitple OR clauses for
> each tag we're looking for) and for building the cloud, since, again,
> all we'd have to do is query the oscar_video_tags table.  What we
> *would* lose, however, would be the date information as we'd have to
> do some sort of MAX query for each tag in the cloud - *not* very
> efficient.
>
> Just looking for some input before I/we spend too much time working
> out the tag searching...

Joins will slow all things down. Using a dedicated table will be appropriated 
if we have videos without tags as will minimize the data stored. But every 
video has its tags (at least extracted from the title).

duck


More information about the dev mailing list