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;
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 tablesterms, 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
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.
add a comment |
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 tablesterms, 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
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.
add a comment |
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 tablesterms, 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
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 tablesterms, 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
php database
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.
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.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered 3 hours ago
Krzysiek Dróżdż♦Krzysiek Dróżdż
18.8k73350
18.8k73350
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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