Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Apress.Pro.Drupal.7.Development.3rd.Edition.Dec.2010.pdf
Скачиваний:
73
Добавлен:
14.03.2016
Размер:
12.64 Mб
Скачать

CHAPTER 15 WORKING WITH TAXONOMY

Storing Taxonomies

If you’re going to go beyond the built-in taxonomy capabilities, it’s imperative that you understand how taxonomies are stored in the database. In a typical non-Drupal database, you might create a flat taxonomy by simply adding a column to a database table. As you’ve seen, Drupal adds a taxonomy through normalized database tables. Figure 15-7 shows the table structures.

Figure 15-7. Drupal’s taxonomy tables. *vid in the taxonomy_term_data table refers to the version ID in the node_revisions table, not to vocabulary ID.

The following tables make up Drupal’s taxonomy storage system:

taxonomy_vocabulary: This table stores the information about a vocabulary that’s editable through Drupal’s Taxonomy interface.

taxonomy_index: This table stores the relationships between nodes and taxonomy terms.

351

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]