Table (database)

Table (database)

In relational databases and flat file databases, a table is a set of data elements (values) that is organized using a model of vertical columns (which are identified by their name) and horizontal rows. A table has a specified number of columns, but can have any number of rows[citation needed]. Each row is identified by the values appearing in a particular column subset which has been identified as a candidate key. Table is another term for relations; although there is the difference in that a table is usually a multi-set (bag) of rows whereas a relation is a set and does not allow duplicates. Besides the actual data rows, tables generally have associated with them some meta-information, such as constraints on the table or on the values within particular columns.

The data in a table does not have to be physically stored in the database. Views are also relational tables, but their data are calculated at query time. Another example are nicknames, which represent a pointer to a table in another database.

Contents

Comparisons with other data structures

In non-relational systems, hierarchical databases, the distant counterpart of a table is a structured file, representing the rows of a table in each record of the file and each column in a record.

Unlike a spreadsheet, the datatype of field is ordinarily defined by the schema describing the table. Some relational systems are less strict about field datatype definitions.

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 tuples. Similarly, representation as a table implies a particular ordering to the rows and columns, whereas a relation is explicitly unordered. However, the database system does not guarantee any ordering of the rows unless an ORDER BY clause is specified in the SELECT statement that queries the table.

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

Table types

Two types of tables exist.

  • A relational table, which is the basic structure to hold user data in a relational database.
  • An object table, which is a table that uses an object type to define a column. It is defined to hold instances of objects of a defined type.

In SQL, use the CREATE TABLE statement to create these tables.[1]

See also

References

  1. ^ Diana Lorentz and Joan Gregoire (Primary Authors) (December 2003). "CREATE TABLE". Oracle Database SQL Reference 10g Release 1 (10.1). Oracle Corporation. Part Number B10759-01. http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_7002.htm#i2095331. 



Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Table (database) — Таблица (англ. table) (в реляционной модели данных) структура хранения данных, состоящая из строк и столбцов и обладающая следующими свойствами: значения, находящиеся в одном столбце таблицы имеют один тип данных; атомарность: ячейки не содержат… …   Википедия

  • Table (information) — Tabular redirects here. For the typewriter key, see tab key. For sortable tables in Wikipedia, see Help:Sorting An example table rendered in a web browser using HTML. A table is a means of arranging data in rows an …   Wikipedia

  • Table — NOTOC Table may refer to:* Table (furniture) * Deliberative procedures: ** Table (parliamentary), deferral of consideration ** Table (verb), contrasting usages * Tables (board game), a class of board games * The Table, a volcanic tuya in British… …   Wikipedia

  • Database design — is the process of producing a detailed data model of a database. This logical data model contains all the needed logical and physical design choices and physical storage parameters needed to generate a design in a Data Definition Language, which… …   Wikipedia

  • Database Deployment Manager — Developer(s) The Unauthorized Frog project Stable release 0.1e Operating system Windows 2000, XP and Vista, Linux License …   Wikipedia

  • Database storage structures — Database tables/indexes are typically stored on hard disk in one of many forms, ordered/unordered Flat files, ISAM, Heaps, Hash buckets or B+ Trees. These have various advantages and disadvantages discussed in this topic. The most commonly used… …   Wikipedia

  • Database security — concerns the use of a broad range of information security controls to protect databases (potentially including the data, the database applications or stored functions, the database systems, the database servers and the associated network links)… …   Wikipedia

  • Database tuning — describes a group of activities used to optimize and homogenize the performance of a database. It usually overlaps with query tuning, but refers to design of the database files, selection of the database management system (DBMS), operating system …   Wikipedia

  • Database-centric architecture — or data centric architecture has several distinct meanings, generally relating to software architectures in which databases play a crucial role. Often this description is meant to contrast the design to an alternative approach. For example, the… …   Wikipedia

  • Table de mortalite — Table de mortalité Une table de mortalité (aussi appelée table de survie) est une construction qui permet de suivre minutieusement le destin d une population. Cet outil est surtout utilisé en démographie et en actuariat afin d étudier le nombre… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”