Why is this design required for the three Term tables of wordpress?

Source: Internet
Author: User
Why is this design required for the three Term tables of wordpress? Can wp_terms and wp_term_taxonomy be merged into a table? What are the benefits of this design? The query also needs to be checked multiple times. wp_terms {code...} wp_term_relationships {code...} why is the design of the three Term tables of wp_term_taxonomy {... wordpress? Wp_termsAnd Wp_term_taxonomyCan it be merged into a table? What are the benefits of this design? Query is performed multiple times.

Wp_terms

Term_id: category IDname: category name slug: scaling name term_group: unknown

Wp_term_relationships

Object_id: corresponding article ID/link IDterm_taxonomy_id: corresponding classification method IDterm_order: Sorting

Wp_term_taxonomy

Term_taxonomy_id: classification method IDterm_id: taxonomy: classification method (category/post_tag) description: unknown parent: parent classification method IDcount: Number of articles Statistics

Reply content:

Why is this design required for the three Term tables of wordpress?Wp_termsAndWp_term_taxonomyCan it be merged into a table? What are the benefits of this design? Query is performed multiple times.

Wp_terms

Term_id: category IDname: category name slug: scaling name term_group: unknown

Wp_term_relationships

Object_id: corresponding article ID/link IDterm_taxonomy_id: corresponding classification method IDterm_order: Sorting

Wp_term_taxonomy

Term_taxonomy_id: classification method IDterm_id: taxonomy: classification method (category/post_tag) description: unknown parent: parent classification method IDcount: Number of articles Statistics

Wp_term_taxonomy is a tree-level structure, so term_taxonomy_id is required,
Wp_terms is a classification table. this id is often used for classification and cannot be saved. Therefore, two half tables are created.

Indeed. When I was in contact with the e-mall project, the project form had been intolerable, and I could clearly make one, but split many single tables. Now, my practice is to write a view on this basis and combine the form into a new table. it is much easier to use it. I hope it will help you ~

I do not understand why these popular website creation programs use so many data tables. if I designed it myself, there would be no more than 15 data tables.
Of course, if the data volume in a single table is too large, it will be quite pear for MySQL.
Ask WordPress users about this question.

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.