Article tag How to store better in mysql

Source: Internet
Author: User
How to store article tags in mysql to better post an article. in order to facilitate tag settings for future search, how should we save these tags in the database? there will be no more than four labels: "mood, birthday, college campus, dormitory friend "is it better to store the tagvarchar (60) field in the my_article table to create an index, or to store the four fields in a my_tag table, there are other better methods, for example, how to store all the tags on the website in mysql?
I published an article about how to save tags in the database for convenience of searching in the future.
The labels will not exceed four or more "mood, birthday, university campus, dormitory friends"
Store the field of tag varchar (60) in the my_article table to create an index?
It is better to split the four into a my_tag table and store them in another better way.
For example, in the future, you need to search for all articles whose tags are "University Campus ".
How can we ensure speed when there are a large number of articles?
Thank you for your suggestions.


------ Solution --------------------
The index id tag corresponds to a table.

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.