For faster navigation, this Iframe is preloading the Wikiwand page for 表 (データベース).

表 (データベース)

関係データベースフラットファイルデータベースにおける(ひょう)またはテーブル英語: table)とは、データ要素(値)の集合を垂直なと水平ののモデルで構成したものである。表には所定の個数の列があるが、行数は不定である。各行は特定の列の値で識別され、それを候補キーと呼ぶ。

表は関係と同じ意味でも使われる。ただし、表は多重集合がありうるが、関係モデルにおける関係は重複を許さない点が異なる。実際のデータ行の他に、表にはその表や特定の列での値に関する制約のような何らかのメタ情報が対応しているのが一般的である。

表内のデータはデータベースに物理的に格納されている必要はない。ビューも一種の表だが、そのデータはクエリ時に計算で求められる。また、別のデータベース内の表へのポインタとして機能するニックネームもある。

他のデータ構造との比較

関係データベース以外(階層型データモデルなど)では、表にほぼ相当するものとして構造化ファイルがあり、レコードが表の行に相当し、レコードのカラムが列に相当する。

表計算ソフトとは異なり、各フィールドのデータ型は、表を表すスキーマで定義されているのが普通である。関係データベースによっては、フィールドのデータ型定義が厳密でないものもある。

表と関係

関係モデルでは、表は関係を表現したものと見なすことができるが、両者は厳密には同じではない。例えば、SQLにおける表は重複した行を含みうるが、真の関係では重複した組 (タプル) はあり得ない。同様に、表として表現すると列と行が順序という情報を持つことになるが、関係には順序は存在しない。このためSQLにおける表は行の順序を保存しないが、必要ならば、SELECT文で ORDER BY 節により順序を指定できる。

関係の他の等価な表現としては、n-次元グラフがある。この場合の n属性数(表の列数)に相当する。例えば、2つの属性の関係と3つの値があるとき、表で表すと2列×3行の表になるが、2次元グラフ上の3つの点としても表せる。表とグラフが表現として等価と言えるのは、列間の順序が重要ではない場合で、表に重複する列がない場合である。

関連項目

{{bottomLinkPreText}} {{bottomLinkText}}
表 (データベース)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?