Database Reference
In-Depth Information
an instance of the supertype is required (e.g., in an operation or in a query),
an instance of the subtype can be used instead.
Generalization may also be characterized according to two criteria. On
the one hand, a generalization can be either total or partial , depending
on whether every instance of the supertype is also an instance of one of the
subtypes. In Fig. 2.3 , the generalization is total, since employees are either
permanent or temporary. On the other hand, a generalization can be either
disjoint or overlapping , depending on whether an instance may belong to
one or several subtypes. In our example, the generalization is disjoint, since
a temporary employee cannot be a permanent one.
2.4 Logical Database Design
In this section, we describe the most used logical data model for databases,
that is, the relational model. We also study two well-known query languages
for the relational model: the relational algebra and SQL.
2.4.1 The Relational Model
Relational databases have been successfully used for several decades for
storing information in many application domains. In spite of alternative
database technologies that have appeared in the last decades, the relational
model is still the most often used approach for storing persistent information,
particularly the information that is crucial for the day-to-day operation of an
organization.
Much of the success of the relational model, introduced by Codd in 1970,
is due to its simplicity, intuitiveness, and its foundation on a solid formal
theory: The relational model builds on the concept of a mathematical relation,
which can be seen as a table of values and is based on set theory and first-
order predicate logic. This mathematical foundation allowed the design of
declarative query languages and a rich spectrum of optimization techniques
that led to ecient implementations. Note that in spite of this, only in the
early 1980s, the first commercial relational DBMS (RDBMS) appeared.
The relational model has a simple data structure, a relation (or table )
composed of one or several attributes (or columns ). Thus, a relational
schema describes the structure of a set of relations. Figure 2.4 shows a
relational schema that corresponds to the conceptual schema of Fig. 2.1 .As
we will see later in this section, this relational schema is obtained by applying
a set of translation rules to the corresponding ER schema. The relational
schema of the Northwind database is composed of a set of relations, such
as Employees , Customers ,and Products . Each of these relations is composed
of several attributes. For example, EmployeeID , FirstName ,and LastName are
Search WWH ::




Custom Search