Manual:category テーブル
Jump to navigation
Jump to search
↑ Manual:コンテンツ | MediaWiki のデータベース レイアウト | category テーブル |
MediaWiki バージョン: | ≧ 1.13 |
category テーブルは既存のすべてのカテゴリを追跡します。カテゴリとは以下のようなものです:
- カテゴリリンクのどこかにエントリーがある、または
- これまでにあった(タスク T28411)。
カテゴリには対応するページがない場合もあるので、ページとは別に追跡する必要があります。cat_pages
、cat_subcats
、cat_files
は符号をつけて下位桁あふれがより明確となるようにしています。
ページとサブカテゴリはcategorylinksテーブルで保管されています。
隠されているカテゴリに関する情報は、page_propsテーブルに保管されます。
The number fields are signed to make underflow more obvious. We make the first number include the second two for better sorting: subtracting for display is easy, adding for ordering is not.
If the information in this table is incorrect, run the maintenance scripts
populateCategory.php
and/or cleanupEmptyCategories.php
, if necessary with the --force
option.フィールド
cat_id
主キー
cat_title
Name of the category, in the same form as page.page_title (with underscores). If there is a category page corresponding to this category, by definition, it has this name (in the Category namespace).
cat_pages
カテゴリに入っているページの数。この数字には、サブカテゴリの数やファイルの数を含みます。
cat_subcats
カテゴリに入っているサブカテゴリの数。
cat_files
カテゴリに入っているファイルの数。
MediaWiki バージョン: | ≦ 1.19 |
Was reserved for future use; apparently no one found a use for it because it was removed in v1.20. Instead, the status of hidden categories is stored in the page props table as the property "hiddencat" in pp_propname
.
スキーマの要約
MediaWiki バージョン: | ≧ 1.20 |
DESCRIBE category;
+-------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+----------------+ | cat_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | cat_title | varbinary(255) | NO | UNI | NULL | | | cat_pages | int(11) | NO | MUL | 0 | | | cat_subcats | int(11) | NO | | 0 | | | cat_files | int(11) | NO | | 0 | | +-------------+------------------+------+-----+---------+----------------+
MediaWiki バージョン: | 1.13 – 1.19 |
DESCRIBE category;
+-------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------------------+------+-----+---------+----------------+ | cat_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | cat_title | varbinary(255) | NO | UNI | NULL | | | cat_pages | int(11) | NO | MUL | 0 | | | cat_subcats | int(11) | NO | | 0 | | | cat_files | int(11) | NO | | 0 | | | cat_hidden | tinyint(3) unsigned | NO | | 0 | | +-------------+---------------------+------+-----+---------+----------------+