Database Reference
In-Depth Information
Databases are classified according to their organizational approach.
The most common approach is the relational database [2]. In rela-
tional databases, all data are stored in a collection of relations.
A relation contains a group of rows that have the same attributes.
A row represents an object and information about that object. A rela-
tion is defined as a table, which is organized into rows (tuples) and
columns (attributes). All the data in the same attribute have the same
domain and stratify the same constraints. A domain presents the pos-
sible values for an attribute in the relation and the constraints make
some restrictions on the domain of an attribute.
In the relational database, a relation cannot contain duplicate tuples
because that would create ambiguities in retrieval.
In the relational database, to ensure uniqueness, each relation
should have an attribute (or a set of attributes), called the primary key,
that uniquely identifies every tuple of the relation [3]. A primary key is
called a simple key if it is a single attribute and it is called a composite
key if it is made up of several attributes.
In the relational database, a foreign key is an attribute (or collection of
attributes) in one relation that uniquely identifies a tuple of another rela-
tion. In other words, a foreign key is an attribute or a group of attributes
used to establish and enforce a link between the data in two relations.
A relational database consisting of independent and unrelated rela-
tions serves little purpose. The power of a relational database lies in
the relationship that can be defined between relations. The most cru-
cial aspect in designing a relational database is to identify the rela-
tionships among relations [4]. The types of relationship include:
• One to many: The primary key relation contains only one
tuple that relates to no, one, or many tuples in the related
relation.
• Many to many: Each tuple in both relations can relate to any
number of tuples (or no tuples) in the other relation. Many-
to-many relationships require a third relation, known as an
associate or linking relation, because relational systems can-
not directly accommodate the relationship.
• One to one: Both relations can have only one tuple on either
side of the relationship. Each primary key value relates to only
one (or no) tuple in the related relation.
Search WWH ::




Custom Search