Manual:Content table/ja

content テーブルはコンテンツ オブジェクトを表現します. A content row represents a slot of a wiki page. The same content row can be reused for many revisions (e.g. when the edits only changed other slots); its association with revisions is tracked by the table.

The content table does not hold the actual content (such as the wikitext of a page), just a reference to it. 主な目的は、コンテントオブジェクトを生成するときに読み込んで解釈される連続データ群にとって必要なメタデータを提供することです.

It was introduced in MediaWiki 1.31 as part of the project; see  for details. During migration from older versions, the table is populated by (run automatically by the upgrade script).

content_id
コンテントオブジェクトのID

content_size
コンテントオブジェクトの表面上サイズ（連続したデータのまとまりには不要）

content_sha1
コンテントオブジェクトの表面上ハッシュ（連続したデータのまとまりには不要）

content_model
への参照. Note the serialization format isn't specified; it should be assumed to be in the default format for the model unless auto-detected otherwise.

content_address
URL-like address of the content blob. Usually the structure is:  where   is a number referencing the  column. It might be different when using external storage.

スキーマの要約
+-+--+--+-+-++ +-+--+--+-+-++ +-+--+--+-+-++
 * Field          | Type                 | Null | Key | Default | Extra          |
 * content_id     | bigint(20) unsigned  | NO   | PRI | NULL    | auto_increment |
 * content_size   | int(10) unsigned     | NO   |     | NULL    |                |
 * content_sha1   | varbinary(32)        | NO   |     | NULL    |                |
 * content_model  | smallint(5) unsigned | NO   |     | NULL    |                |
 * content_address | varbinary(255)      | NO   |     | NULL    |                |

インデックス
 +-++--+--+-+---+-+--++--++-+---+ +-++--+--+-+---+-+--++--++-+---+ +-++--+--+-+---+-+--++--++-+---+
 * Table  | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
 * content |         0 | PRIMARY  |            1 | content_id  | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |