Table (database) Article Index for
Table
Website Links For
Table
 

Information About

Table (database)




A table has a specified number of columns but can have any number of rows. Besides the actual data rows, tables generally have associated with them some "header" information, such as constraints on the table or on the values within particular columns.


COMPARISONS WITH OTHER DATA STRUCTURES

In non-relational / hierarchical systems, the equivalent of a table is a structured File , containing lines or records (the rows) and fields (the columns).

Unlike a Spreadsheet , a database table can not take arbitrary information in any cell, nor can values be represented as formulae which compute values on the fly. The Datatype of each field is strictly defined by the Schema describing the table.


TABLES VERSUS RELATIONS

In terms of the Relational Model of databases, a table can be considered a convenient representation of a Relation , but the two are not strictly equivalent. For instance, an SQL table can potentially contain duplicate rows, whereas a true relation cannot contain duplicate Tuple s. Similarly, representation as a table implies a particular ordering to the rows and columns, whereas a relation is explicitly unordered.

An equally valid representation of a relation is as an ''n''-dimensional graph, where ''n'' is the number of attributes (a table's columns). For example, a relation with 2 attributes and 3 values can be represented as a table with 2 columns and 3 rows, or as a 2-dimensional graph with 3 points. Clearly, the table and graph representations are only equivalent if the ordering of rows is not significant, and the table has no duplicate rows.


SEE ALSO