Why WordPress uses 4 tables to manage terms Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsDatabase Tables in Wordpress ThemeCreating Tables in WordPress DatabaseThe ideal place for storing persistent PHP objectsAdding custom tables to WordpressWacky taxonomy in wordpressReset/Reorder posts ID in the MySQL wp_posts tableWhat unexpected data might be stored in terms table and related tables?Create Tables in WordPressWhy WordPress uses `endwhile;` inside the templates?Confused about where to store my data

What is the least dense liquid under normal conditions?

Multiple fireplaces in an apartment building?

Check if a string is entirely made of the same substring

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

Why did C use the -> operator instead of reusing the . operator?

An octave chord is not a real standard concept?

Holes in ElementMesh with ToElementMesh of ImplicitRegion

What *exactly* is electrical current, voltage, and resistance?

Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?

Implementing 3DES algorithm in Java: is my code secure?

Does Mathematica have an implementation of the Poisson binomial distribution?

A Dictionary or Encyclopedia of Fantasy or Fairy Tales from the 1960s

A faster way to compute the largest prime factor

How do I proof this combinatorial identity

What is the best way to deal with NPC-NPC combat?

Rolling Stones Sway guitar solo chord function

How to open locks without disable device?

What was Apollo 13's "Little Jolt" after MECO?

Mistake in years of experience in resume?

Retract an already submitted recommendation letter (written for an undergrad student)

Why do games have consumables?

How to get even lighting when using flash for group photos near wall?

Multiple options vs single option UI

My admission is revoked after accepting the admission offer



Why WordPress uses 4 tables to manage terms



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsDatabase Tables in Wordpress ThemeCreating Tables in WordPress DatabaseThe ideal place for storing persistent PHP objectsAdding custom tables to WordpressWacky taxonomy in wordpressReset/Reorder posts ID in the MySQL wp_posts tableWhat unexpected data might be stored in terms table and related tables?Create Tables in WordPressWhy WordPress uses `endwhile;` inside the templates?Confused about where to store my data



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am a PHP developer and recently I am trying to build a platform which needs lots of categories/filters/tags some in hierarchy some not.



So the question is...



I am able to manage terms in these tables
terms, terms_metadata and terms_relationships, but there is another table in WordPress - terms_taxanomymy.



What is the significance of defining another table for just storing "parent", "type", "count" and "description" when you can do that in terms table itself.










share|improve this question









New contributor




harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    2















    I am a PHP developer and recently I am trying to build a platform which needs lots of categories/filters/tags some in hierarchy some not.



    So the question is...



    I am able to manage terms in these tables
    terms, terms_metadata and terms_relationships, but there is another table in WordPress - terms_taxanomymy.



    What is the significance of defining another table for just storing "parent", "type", "count" and "description" when you can do that in terms table itself.










    share|improve this question









    New contributor




    harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      2












      2








      2








      I am a PHP developer and recently I am trying to build a platform which needs lots of categories/filters/tags some in hierarchy some not.



      So the question is...



      I am able to manage terms in these tables
      terms, terms_metadata and terms_relationships, but there is another table in WordPress - terms_taxanomymy.



      What is the significance of defining another table for just storing "parent", "type", "count" and "description" when you can do that in terms table itself.










      share|improve this question









      New contributor




      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am a PHP developer and recently I am trying to build a platform which needs lots of categories/filters/tags some in hierarchy some not.



      So the question is...



      I am able to manage terms in these tables
      terms, terms_metadata and terms_relationships, but there is another table in WordPress - terms_taxanomymy.



      What is the significance of defining another table for just storing "parent", "type", "count" and "description" when you can do that in terms table itself.







      php database






      share|improve this question









      New contributor




      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 3 hours ago









      Krzysiek Dróżdż

      18.8k73350




      18.8k73350






      New contributor




      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      harshit mishraharshit mishra

      141




      141




      New contributor




      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      harshit mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          3














          Well, it uses 3 tables. The fourth one (wp_termmeta) is just a way of allowing you to store some meta values for terms (icons, additional descriptions and so on).



          Citing from Codex:





          • wp_terms - The categories for both posts and links and the tags for posts are found within the wp_terms table.


          • wp_termmeta - Each term features information called the meta data and it is stored in wp_termmeta.


          • wp_term_relationships - Posts are associated with categories and tags from the wp_terms table and this association is maintained in
            the wp_term_relationships table. The association of links to their
            respective categories are also kept in this table.


          • wp_term_taxonomy - This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.



          So the only part that may be confusing is that there are separate tables for terms and term_taxonomy... And it can be confusing, because it has lost its meaning nowadays.



          But before WP 4.2.2 (I guess) the approach to terms was a little bit different - terms were unique across wp_terms table.



          So if you had “books” as category and “books” as tag, then there was only one record with “books” in wp_terms and obviously 2 records in wp_term_taxonomy.



          But when the wp_termmeta table was introduced it would make it confusing - so such terms were split. And today, for the example above, you’ll have two separate rows in wp_terms table.






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "110"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            harshit mishra is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f336243%2fwhy-wordpress-uses-4-tables-to-manage-terms%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Well, it uses 3 tables. The fourth one (wp_termmeta) is just a way of allowing you to store some meta values for terms (icons, additional descriptions and so on).



            Citing from Codex:





            • wp_terms - The categories for both posts and links and the tags for posts are found within the wp_terms table.


            • wp_termmeta - Each term features information called the meta data and it is stored in wp_termmeta.


            • wp_term_relationships - Posts are associated with categories and tags from the wp_terms table and this association is maintained in
              the wp_term_relationships table. The association of links to their
              respective categories are also kept in this table.


            • wp_term_taxonomy - This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.



            So the only part that may be confusing is that there are separate tables for terms and term_taxonomy... And it can be confusing, because it has lost its meaning nowadays.



            But before WP 4.2.2 (I guess) the approach to terms was a little bit different - terms were unique across wp_terms table.



            So if you had “books” as category and “books” as tag, then there was only one record with “books” in wp_terms and obviously 2 records in wp_term_taxonomy.



            But when the wp_termmeta table was introduced it would make it confusing - so such terms were split. And today, for the example above, you’ll have two separate rows in wp_terms table.






            share|improve this answer



























              3














              Well, it uses 3 tables. The fourth one (wp_termmeta) is just a way of allowing you to store some meta values for terms (icons, additional descriptions and so on).



              Citing from Codex:





              • wp_terms - The categories for both posts and links and the tags for posts are found within the wp_terms table.


              • wp_termmeta - Each term features information called the meta data and it is stored in wp_termmeta.


              • wp_term_relationships - Posts are associated with categories and tags from the wp_terms table and this association is maintained in
                the wp_term_relationships table. The association of links to their
                respective categories are also kept in this table.


              • wp_term_taxonomy - This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.



              So the only part that may be confusing is that there are separate tables for terms and term_taxonomy... And it can be confusing, because it has lost its meaning nowadays.



              But before WP 4.2.2 (I guess) the approach to terms was a little bit different - terms were unique across wp_terms table.



              So if you had “books” as category and “books” as tag, then there was only one record with “books” in wp_terms and obviously 2 records in wp_term_taxonomy.



              But when the wp_termmeta table was introduced it would make it confusing - so such terms were split. And today, for the example above, you’ll have two separate rows in wp_terms table.






              share|improve this answer

























                3












                3








                3







                Well, it uses 3 tables. The fourth one (wp_termmeta) is just a way of allowing you to store some meta values for terms (icons, additional descriptions and so on).



                Citing from Codex:





                • wp_terms - The categories for both posts and links and the tags for posts are found within the wp_terms table.


                • wp_termmeta - Each term features information called the meta data and it is stored in wp_termmeta.


                • wp_term_relationships - Posts are associated with categories and tags from the wp_terms table and this association is maintained in
                  the wp_term_relationships table. The association of links to their
                  respective categories are also kept in this table.


                • wp_term_taxonomy - This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.



                So the only part that may be confusing is that there are separate tables for terms and term_taxonomy... And it can be confusing, because it has lost its meaning nowadays.



                But before WP 4.2.2 (I guess) the approach to terms was a little bit different - terms were unique across wp_terms table.



                So if you had “books” as category and “books” as tag, then there was only one record with “books” in wp_terms and obviously 2 records in wp_term_taxonomy.



                But when the wp_termmeta table was introduced it would make it confusing - so such terms were split. And today, for the example above, you’ll have two separate rows in wp_terms table.






                share|improve this answer













                Well, it uses 3 tables. The fourth one (wp_termmeta) is just a way of allowing you to store some meta values for terms (icons, additional descriptions and so on).



                Citing from Codex:





                • wp_terms - The categories for both posts and links and the tags for posts are found within the wp_terms table.


                • wp_termmeta - Each term features information called the meta data and it is stored in wp_termmeta.


                • wp_term_relationships - Posts are associated with categories and tags from the wp_terms table and this association is maintained in
                  the wp_term_relationships table. The association of links to their
                  respective categories are also kept in this table.


                • wp_term_taxonomy - This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.



                So the only part that may be confusing is that there are separate tables for terms and term_taxonomy... And it can be confusing, because it has lost its meaning nowadays.



                But before WP 4.2.2 (I guess) the approach to terms was a little bit different - terms were unique across wp_terms table.



                So if you had “books” as category and “books” as tag, then there was only one record with “books” in wp_terms and obviously 2 records in wp_term_taxonomy.



                But when the wp_termmeta table was introduced it would make it confusing - so such terms were split. And today, for the example above, you’ll have two separate rows in wp_terms table.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 3 hours ago









                Krzysiek DróżdżKrzysiek Dróżdż

                18.8k73350




                18.8k73350




















                    harshit mishra is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    harshit mishra is a new contributor. Be nice, and check out our Code of Conduct.












                    harshit mishra is a new contributor. Be nice, and check out our Code of Conduct.











                    harshit mishra is a new contributor. Be nice, and check out our Code of Conduct.














                    Thanks for contributing an answer to WordPress Development Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f336243%2fwhy-wordpress-uses-4-tables-to-manage-terms%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bett Inhaltsverzeichnis Geschichte | Bettformen | Bettgrößen | Andere Bezeichnungen | Bettenmangel | Betten in der bildenden Kunst | Schlafmedizinische Gesichtspunkte | Siehe auch | Literatur | Weblinks | Einzelnachweise | NavigationsmenüBett, Bettstatt, BettstelleCommons: BettBabybetten: Anwendung, Ausstattungsmerkmale und VergleichskriterienWasserbetten. Vorurteile im TestHapfnNursch10.1007/s11818-012-0584-74006250-8AKS4329276-8

                    Luksemburg Sisukord Nimi | Asend | Loodus | Riigikord | Haldusjaotus | Rahvastik | Riigikaitse | Majandus | Taristu | Ajalugu | Eesti ja Luksemburgi suhted | Haridus | Kultuur | Vaata ka | Viited | Välislingid | Navigeerimismenüü50° N, 6° EÜlevaade Luksemburgi kaitsealadest.Luksemburgi rahvaarv. Statistikaamet.World Bank'i andmebaasÜlevaade Luksemburgi loodusest.Ülevaade Luksemburgi metsadest.Guy Colling. "Red List of the Vascular Plants of Luxembourg." Travaux scientifiques du Musée national d’histoire naturelle Luxembourg. 2005.Luxembourg’s biodiversity at risk.Maailma kahepaiksete andmebaas.Denis Lepage. "Luxembourg." Avibase.Ülevaade temperatuuridest. Luksemburgi meteoroloogiateenistus.Ülevaade Luksemburgist. Euroopa Liidu esinduse koduleht.Système politique. TerritoireÜlevaade Luksemburgi rahvastikust. Luksemburgi statistikaamet.Luksemburgi rahvastik. Luksemburgi statistikaamet.The World FactbookMonique Borsenberger, Paul Dickes. "Religions au Luxembourg. Quelle évolution entre 1999-2008". Luksemburgi statistikaamet. 2011.Luksemburgi peapiiskopkond. Catholic-Hierarchy.Luksemburgi armee koduleht.Luksemburgi armee relvastus.Eesti Välisministeerium.Luksemburgi rahvastik. Luksemburgi statistikaamet.Luksemburgi Eesti Seltsi koduleht.Helen Eelrand. "Raadio, mis muutis maailma." Eesti Päevaleht. 13. märts 2004.Ülevaade Luksemburgi haridussüsteemist.Ülevaade Luksemburgi keskkoolidest.Luksemburgr

                    Valle di Casies Indice Geografia fisica | Origini del nome | Storia | Società | Amministrazione | Sport | Note | Bibliografia | Voci correlate | Altri progetti | Collegamenti esterni | Menu di navigazione46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)Sito istituzionaleAstat Censimento della popolazione 2011 - Determinazione della consistenza dei tre gruppi linguistici della Provincia Autonoma di Bolzano-Alto Adige - giugno 2012Numeri e fattiValle di CasiesDato IstatTabella dei gradi/giorno dei Comuni italiani raggruppati per Regione e Provincia26 agosto 1993, n. 412Heraldry of the World: GsiesStatistiche I.StatValCasies.comWikimedia CommonsWikimedia CommonsValle di CasiesSito ufficialeValle di CasiesMM14870458910042978-6