Attribute An attribute is a named column of a relation.
Domain A domain is a set of allowable values for one or more attributes.
Tuple A tuple is a row of a relation.
Degree The degree of a relation is the number of attributes it contains.
Cardinality A cardinality of a relation is the number of tuples it contains.
Relational database A collection of normalized relations with distinct relation names.
| Formal term | Alternative 1 | Alternative 2 |
|---|---|---|
| Realtion | Table | File |
| Tuple | Row | Record |
| Attribute | Column | Field |
Relation schema
A named relation defined by a set of attributes and domain name pairs.
Example: Let A1, A2, ..., An
be attributes with domains D1, D2, ..., Dn.
Then the set
S = {A1:D1, A2:D2, ..., An:Dn}
is a relation schema. A relation R defined by the relational schema S
is a set of mappings from the attribute names to their corresponding domains. Thus, the relation
R is a set on n-tuples:
(A1:d1, A2:d2, ..., An:dn)
such that di belongs to Di
Relation database schema Aset of relation schemas, each with a distinct name.
Candidate key
A superkey such that there is no proper subset is a superkey in the relation.
A candidate key, K, for a relation R has two properties:
Primary key The candidate key that is selected to identify tuples uniquely within the relation.
Foreign key
An attribute, or set of attributes, within one relation that matches the candidate key of some (possibly the same) relation.
In addition, there are two important integrity rules, which are constraint sor restrictions that apply to all instances of the database. The two principal rules fo the relational model are known as entity integrity and referrential integrity.
Null represents a value for an attribute that is currently unknown or is not appllicable for this tuple.
Entity integrity in a base relation, noattribute of a primary key can be Null.
Referrential integrity If a foreign key exists in a relation, either the foreign key value must match a candidate key value of some tuple in its home relation or the foreign key value must be wholly Null.
Enterprise constraints Additional rules specified by the users or database administrators of a database.