Community Documentation

Tables: taxonomy (core)

Last updated November 19, 2007. Created by sime on June 24, 2006.
Edited by AjK. Log in to edit this page.

Here is a list of the tables, in a standard (core) Drupal database installation, that store information related to taxonomy and categories. Please refer to the database documentation for progress on a detailed database schema and data dictionary.

term_data
A term is a label that can be applied to nodes. This table is where the terms are defined.
term_node
This table links terms to nodes.
term_hierarchy
Vocabulary hierarchies are achieved by defining parent-child relationships between terms.
term_relation
Any terms that have a relationship can be linked to each. These links are defined here.
term_synonym
Defines alternatives to existing terms. Eg. "bike" might be given a synonym of "bicycle".
vocabulary
A vocabulary is list or group of related terms.
vocabulary_node_types
You can choose which vocabularies can be used with various node types. Thus when you create a new node, you will only have certain vocabulary terms to choose from.

Comments

May be it's me but...

As far as I can see, [vocabulary] is "one-to-many" related with [term_data].

BTW, lot of people made a great effort half a year ago to document quite every drupal table, but I didn't see any improvement in the documentation and any new and complete ER diagram.

Any news about "hook_schema" and possible automatic representations of Drupal's DB?

Regarding term_node

In Drupal 6.x at least, the term_node table has both links to the node and node_revision (a specific revision of that node), using the foreign key vid. This can be confusing in this context as this name is also used to identify a vocabulary, i.e. Vocabulary ID.

the link

the link to database documentation is dead.

Drupal is like falling in love with a girl after you got to know her, instead of instantly falling in love with her appearance... :)

nobody click here