== Application to relational databases ==
A '''[[data ___domain|data type]]''' as used in a typical relational database might be the set of integers, the set of character strings, the set of dates, or the two [[Boolean value]]s ''true'' and ''false'', and so onetc. The corresponding '''type names''' for these types might be the strings "int", "char", "date", "boolean", etc. It is important to understand, though, that relational theorymodel does not dictate what types are to be supported; indeed, nowadays provisions are expected to be available for ''user-defined'' types in addition to the ''built-in'' ones provided by the system.
'''Attributes''' are commonly represented as '''[[Column (database)|Attributecolumns]]''', is the term used in the theory for what is commonly referred to'''tuples''' as a '''column[[row (database)|rows]]'''. Similarly, and '''tablerelations''' is commonly used in place of the theoretical termas '''relationtables''' (though in SQL the term is by no means synonymous with relation). A table data structure is specified as a list of column definitions, each of which specifies a unique column name and the type of the values that are permitted for that column. An '''attribute ''value''''' is the entry in a specific column and row, such as "John Doe" or "35".
A database '''[[relvar]]''' (relation variable) is commonly known as a '''base table'''. The heading of its assigned value at any time is as specified in the table declaration and its body is that most recently assigned to it by an '''update operator''' (typically, INSERT, UPDATE, or DELETE). The heading and body of the table resulting from evaluating a query are determined by the definitions of the operators used in that query.
A '''[[tuple]]''' is basically the same thing as a '''[[row (database)|row]]''', except in an SQL DBMS, where the column values in a row are ordered. (Tuples are not ordered; instead, each attribute value is identified solely by the '''attribute name''' and never by its ordinal position within the tuple.) An attribute name might be "name" or "age".
A '''[[relation (database)|relation]]''' is a '''[[table (database)|table]]''' structure definition (a set of column definitions) along with the data appearing in that structure. The structure definition is the '''heading''' and the data appearing in it is the '''body''', a set of rows. A database '''[[relvar]]''' (relation variable) is commonly known as a '''base table'''. The heading of its assigned value at any time is as specified in the table declaration and its body is that most recently assigned to it by invoking some '''update operator''' (typically, INSERT, UPDATE, or DELETE). The heading and body of the table resulting from evaluation of some query are determined by the definitions of the operators used in the expression of that query. (Note that in SQL the heading is not always a set of column definitions as described above, because it is possible for a column to have no name and also for two or more columns to have the same name. Also, the body is not always a set of rows because in SQL it is possible for the same row to appear more than once in the same body.)
=== SQL and the relational model ===
|