Column (database)

Column (database)

In the context of a relational database table, a column is a set of data values of a particular simple type, one for each row of the table.[1] The columns provide the structure according to which the rows are composed.

The term field is often used interchangeably with column, although many consider it more correct to use field (or field value) to refer specifically to the single item that exists at the intersection between one row and one column.

In relational database terminology, column's equivalent is called attribute.

For example, a table that represents companies might have the following columns:

  • ID (integer identifier, unique to each row)
  • Name (text)
  • Address line 1 (text)
  • Address line 2 (text)
  • City (integer identifier, drawn from a separate table of cities, from which any state or country information would be drawn)
  • Postal code (text)
  • Industry (integer identifier, drawn from a separate table of industries)
  • etc.

Each row would provide a data value for each column and would then be understood as a single structured data value, in this case representing a company. More formally, each row can be interpreted as a relvar, composed of a set of tuples, with each tuple consisting of the two items: the name of the relevant column and the value this row provides for that column.

Column 1 Column 2
Row 1 Row 1, Column 1 Row 1, Column 2
Row 2 Row 2, Column 1 Row 2, Column 2
Row 3 Row 3, Column 1 Row 3, Column 2

Examples of database: MySQL, SQL Server, Access, Oracle, Sybase, DB2.

Coding involved: SQL [Structured Query Language]

See more at SQL.

See also

References

  1. ^ The term "column" also has equivalent application in other, more generic contexts. See e.g., Flat file database, Table (information).

Wikimedia Foundation. 2010.

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

Look at other dictionaries:

  • Column (disambiguation) — A column is a vertical structural element in architecture. Column may also refer to: Column (botany) or gynostemium, a part of an orchid Column (database), a set of data values of a particular type in a relational database Column (formation), a… …   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 administration and automation — Database administration is the function of managing and maintaining database management systems (DBMS) software. Mainstream DBMS software such as Oracle, IBM DB2 and Microsoft SQL Server need ongoing management. As such, corporations that use… …   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 Management Library — DBL Database Management Library Developer(s) ROCHA, Rodrigo C. O. Initial release July 2010 (2010 07) Stable release 1.0 / July 2, 2010; 15 months ago (2010 07 02) …   Wikipedia

  • Column-oriented DBMS — A column oriented DBMS is a database management system (DBMS) that stores its content by column rather than by row. This has advantages for data warehouses and library catalogues where aggregates are computed over large numbers of similar data… …   Wikipedia

  • Database models — A data model is not just a way of structuring data: it also defines a set of operations that can be performed on the data. The relational model, for example, defines operations such as select, project, and join. Although these operations may not… …   Wikipedia

  • Database model — A database model is the theoretical foundation of a database and fundamentally determines in which manner data can be stored, organized, and manipulated in a database system. It thereby defines the infrastructure offered by a particular database… …   Wikipedia

  • Database trigger — A database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database. The trigger is mostly used for keeping the integrity of the information on the database. For example,… …   Wikipedia

  • Column (data store) — A column consists of a (unique) name, a value, and a timestamp. A column of a distributed data store is a NoSQL object of the lowest level in a keyspace. It is a tuple (a key value pair) consisting of three elements:[1] Unique name: Used to… …   Wikipedia

Share the article and excerpts

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