# Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR

**Download**(direct link)

**:**

**23**> 24 25 26 27 28 29 .. 76 >> Next

The freedom from anomalies is based on the fact that relational databases are based on the mathematics of set theory. Roughly speaking, set theory defines a table as a relation. Each entity in a relation is called a tuple and each column is an attribute. The number of tuples is the cardinality of the relation and the number of attributes its degree.

The following table presents these correspondences. Note that relational databases are a generalization of the mathematics of set theory relations and the correspondences between set theory and relational databases are not always direct.

Set theory term Relational database term

Relation Table

Tuple Row (or record)

Attribute Column

Introduction to the Teradata RDBMS for UNIX

3-1

The Relational Model

About This Chapter

Some Other Definitions

Because the mathematical operations on relations are well-defined, any manipulation of a table in a relational database has a consistent, predictable outcome. This contrasts with all other database management systems, none of which is based on mathematical theory and none of which treats its data formally. Because the operations on relational databases are so well defined, users can perform ad hoc, interactive queries of the database—unlike other database management systems that require a system programmer to predefine all links between files and all possible queries of the database.

Under the covers, the SQL optimizer uses relational algebra to build the most optimal access to the requested data. Because the definition of the database can change from time to time, the optimizer can readily adapt to any such changes and reoptimize access paths without programmer intervention.

The following terms are defined now to make the discussion that follows easier to understand.

Term Definition

Primary key A unique identifier for a relation. In set theory (and in relational database theory), duplicate rows are not allowed. However, commercially available relational databases often allow duplicate rows in relations. In those cases, the relation does not have a primary key. Relations with a primary (or candidate) key do not permit duplicate rows. The Teradata RDBMS permits enforcement of the no duplicates rule even when no primary key is specified.

Candidate key Any relation might have multiple unique identifiers. Each such unique identifier is called a candidate key. A candidate key must satisfy the properties of uniqueness and minimality. That is, for any attribute, no two rows of the table have the same value for that attribute and if it is composite, no component can be eliminated without destroying the uniqueness property.

Alternate key Any candidate key not chosen as the primary key.

3-2

Introduction to the Teradata RDBMS for UNIX

The Relational Model

About This Chapter

Term Definition

Foreign key A primary key in another relation that is also a column value in the current relation. Foreign keys are used to join tables and may participate in the primary key.

Functional dependence Attribute X is functionally dependent on attribute Y if and only if each Y value in the relation has associated with it exactly one X value.

Full functional dependence Attribute X is fully functionally dependent on attribute Y if and only if it is functionally dependent on Y and not functionally dependent on any proper subset of Y.

Transitive dependence A state in which an attribute is fully functionally dependent, but by means of an intermediate attribute. Transitive dependence is a state that normalization seeks to eliminate.

Determinant Any attribute on which some other attribute is fully functionally dependent.

Multivalued dependence Given a relation with attributes X, Y, and Z, the multivalued dependence holds if and only if the set of Y-values matching a given (X-value, Z-value) pair depends only on the X-value and is independent of the Z-value.

Join An operation in which data is retrieved from more than one table.

Join dependency A relation satisfies join dependency if and only if it is equal to the join of its projections on its component attributes.

Introduction to the Teradata RDBMS for UNIX

3-3

The Relational Model

Normalization

Normalization

The theory of normalization is at the root of the relational model of database management. Normalization theory is constructed around the concept of normal forms. These normal forms define a system of constraints. If a relation meets the constraints of a particular normal form, then it is said to be in that form.

You can think of the normal forms as an onion, with the outermost layer being the set of all relations, including unnormalized relations. The figure that follows illustrates this. As you work your way to the core of the onion, you must pass through each lower normal form. As a result, a relation that has achieved fifth normal form has also achieved first, second, third, and fourth normal forms.

Figure 3-1 Layers of normalization.

**23**> 24 25 26 27 28 29 .. 76 >> Next