Table (database)

A database table is a set of data which are structured in rows and columns in a table. The columns determine what is stored in the table. In the rows, the individual records are.

The structure follows a fixed schema that defines which data can be stored in the table.

Tables in relational databases

Tables play an important role in the context of relational databases. Here, the table is a user-oriented presentation form of a relation represents the relation is named after and based on the relational databases.

The rows are referred to herein as a tuple, the columns are called attributes. The description of the table is the relation schema and defines the type of the attributes. A database table may include so-called primary key consisting of one or more attributes. A primary key is a unique identifier of a record. In addition to the primary key foreign key can be included that refer to the primary key, or in rarer cases, other attributes of another table. A table that does not contain a foreign key is referred to as a flat table.

Example of creating a table in SQL: