About the web2.0 tag tag implementation method __web

Source: Internet
Author: User

We often find some tags when we browse the site of web2.0, but how does this tag be implemented? At first I did not know that asked a lot of things did not get a result, and then to explore a method of their own is very simple, I wrote a few days ago a small system (www.88doc.com) to do the introduction, I first give the table structure (field type omitted):
Cms_tag table: tag_id,tag_name,article_id;
Cms_tag_article table: id,tag_id,article_id;
Article table does not have to say and tag no direct relationship, we are concerned about the Cms_tag_article table, this is a relational table, the function is to let cms_tag and article table many-to-many relationship. In this way, when adding article to tag also added to the cms_tag_article also add a relationship, so that the article display page can also query out the relevant tags of the article, you can also query out all the articles containing a tag.
Currently www.88doc.com is the way to do the tag system. If a friend has a better way, please advise.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.