Page 154 - DMGT505_MANAGEMENT_INFORMATION_SYSTEM
P. 154
Unit 8: Databases and Data Warehouses
8.3.1 Relational Model Notes
The relational model was introduced by E.F. Codd in 1970 as a way to make database management
systems more independent of any particular application. It is a mathematical model defined in
terms of predicate logic and set theory.
Figure 8.4: Relational Model
The products that are generally referred to as relational databases in fact implement a model
that is only an approximation to the mathematical model defined by Codd. Three key terms are
used extensively in relational database models: relations, attributes, and domains. A relation is
a table with columns and rows. The named columns of the relation are called attributes, and the
domain is the set of values the attributes are allowed to take.
The basic data structure of the relational model is the table, where information about a particular
entity (say, an employee) is represented in rows (also called tuples) and columns. Thus, the
“relation” in “relational database” refers to the various tables in the database; a relation is a set
of tuples. The columns enumerate the various attributes of the entity (the employee’s name,
address or phone number, for example), and a row is an actual instance of the entity (a specific
employee) that is represented by the relation. As a result, each tuple of the employee table
represents various attributes of a single employee.
All relations (and, thus, tables) in a relational database have to adhere to some basic rules to
qualify as relations. First, the ordering of columns is immaterial in a table. Second, there can’t be
identical tuples or rows in a table. And third, each tuple will contain a single value for each of its
attributes.
A relational database contains multiple tables, each similar to the one in the “flat” database
model. One of the strengths of the relational model is that, in principle, any value occurring in
two different records (belonging to the same table or to different tables), implies a relationship
among those two records. Yet, in order to enforce explicit integrity constraints, relationships
between records in tables can also be defined explicitly, by identifying or non-identifying
parent-child relationships characterized by assigning cardinality (1:1, (0)1:M, M:M). Tables can
also have a designated single attribute or a set of attributes that can act as a “key”, which can be
used to uniquely identify each tuple in the Table.
A key that can be used to uniquely identify a row in a table is called a primary key. Keys are
commonly used to join or combine data from two or more Tables.
Example: An Employee Table may contain a column named Location which contains a
value that matches the key of a Location table. Keys are also critical in the creation of indexes,
LOVELY PROFESSIONAL UNIVERSITY 149