You are on page 1of 3

Andrea Javier Hernández

TDM31I
Base de Datos
Maestra. Luz Almada
28/05/22
Define the concepts and representation of domains,
attributes, tuples, relationships, primary key and foreign
key.

• Domains: It is a collection of values, from which one or more


attributes get their actual values. They can be finite (days of the
week, months of the year, letters of the alphabet, etc...) or infinite
(real numbers, days of the calendar - as long as they are not
limited by the operating system or the DBMS-, etc...)

• Attribute: It corresponds to a column of the table (equivalent to a


field of a record) and they are defined on domains. The number of
attributes is called the degree. The degree does not vary over
time, if we add an attribute to a relationship, we can consider that it
is another new relationship.
• Tuple or register: Corresponds to a row of the table. It represents
each of the occurrences of the relationship (equivalent to what we
know as the occurrence of a record, in classic files). The number
tuples is called the cardinality, the cardinality varies with time.

• Relationships: It is the central element of the relational model.


They are the main objects on which information should be
collected and generally denote people, places, things or events of
interest. A relation has a name, a set of attributes that represent its
properties, and is made up of a set of tuples that include the
values that each of the attributes takes for each of the tuples in the
relation. A relation is represented by a two-dimensional table (the
columns represent the attributes and the rows represent the tuples
or records).
• Primary key: It is possible for a relation to have more than one
candidate key, in which case one of them is chosen as the primary
key and the rest are called alternative keys. In practice, the choice
of the primary key is usually simple. Every relationship, without
exception, has a primary key and is usually represented by
underlining and/or adding the # character to the corresponding
attribute (or set of attributes).

• foreign key: is an attribute (or set of attributes) of a relation R1


that is also the primary key of another relation R2. It is used to
reference the tuple of R2 whose primary key matches the value of
the foreign key of R1. Both keys must be defined on the same
domain.
For example, the NIF-PROV attribute of the PRICES relation is a
foreign key since it is used to refer to a tuple of SUPPLIERS
through the NIF primary key.

References
Diseño de Bases de Datos ( I ) - Conceptos del Modelo
Relacional

You might also like