MySQL: Tagged table Vs Lookup table

I want to know if there is any difference between the tag cloud table and the lookup table.

As far as I understand, a tagged cloud table could be something like this,

tag_id  page_id
    1       3
    4       6
    etc

and a lookup table could be something like this too,

 img_id   category_id
    1        2
    1        4
    etc

Don’t they look the same and have the same concept!??

But I read this from a book that both columns in the lookup must be set as primary key. Is this necessary?

Then what about the columns in the tagged table, should I set them as primary key?

Thanks.

A tag cloud is not a mysql concept that I am aware of. A tag cloud is a blob of the tags used on posts/articles. Usually the more frequently used words appear larger, and the lesser used smaller. The tag cloud table is a lookup table since it takes a tag and matches it with the post. A lookup table holds the primary keys of the things it is matching.