Chapter 16 - Logical Database Design
Chapter 16 - Logical Database Design
Chapter 16 - Logical Database Design
16
Methodology – Logical
Database Design for the
Relational Model
Chapter Objectives
In this chapter you will learn:
n How to derive a set of relations from a conceptual data model.
n How to validate these relations using the technique of normalization.
n How to validate a logical data model to ensure it supports the required
transactions.
n How to merge local logical data models based on one or more user views into a
global logical data model that represents all user views.
n How to ensure that the final logical data model is a true and accurate
representation of the data requirements of the enterprise.
In Chapter 9, we described the main stages of the database system development lifecycle,
one of which is database design. This stage is made up of three phases, namely conceptual,
logical, and physical database design. In the previous chapter we introduced a method-
ology that describes the steps that make up the three phases of database design and then
presented Step 1 of this methodology for conceptual database design.
In this chapter we describe Step 2 of the methodology, which translates the conceptual
model produced in Step 1 into a logical data model.
The methodology for logical database design described in this book also includes an
optional Step 2.6, which is required when the database has multiple user views that are
managed using the view integration approach (see Section 9.5). In this case, we repeat
Step 1 through Step 2.5 as necessary to create the required number of local logical data
models, which are then finally merged in Step 2.6 to form a global logical data model.
A local logical data model represents the data requirements of one or more but not all user
views of a database and a global logical data model represents the data requirements for
all user views (see Section 9.5). However, on concluding Step 2.6 we cease to use the
term ‘global logical data model’ and simply refer to the final model as being a ‘logical
data model’. The final step of the logical database design phase is to consider how well
the model is able to support possible future developments for the database system.
It is the logical data model created in Step 2 that forms the starting point for physical
database design, which is described as Steps 3 to 8 in Chapters 17 and 18. Throughout
the methodology the terms ‘entity’ and ‘relationship’ are used in place of ‘entity type’ and
462 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
‘relationship type’ where the meaning is obvious; ‘type’ is generally only added to avoid
ambiguity.
Objective To translate the conceptual data model into a logical data model and then
to validate this model to check that it is structurally correct and able to
support the required transactions.
In this step, the main objective is to translate the conceptual data model created in Step 1
into a logical data model of the data requirements of the enterprise. This objective is
achieved by following the activities listed below:
Step 2.1 Derive relations for logical data model
Step 2.2 Validate relations using normalization
Step 2.3 Validate relations against user transactions
Step 2.4 Check integrity constraints
Step 2.5 Review logical data model with user
Step 2.6 Merge logical data models into global model (optional step)
Step 2.7 Check for future growth
We begin by deriving a set of relations (relational schema) from the conceptual data
model created in Step 1. The structure of the relational schema is validated using normal-
ization and then checked to ensure that the relations are capable of supporting the trans-
actions given in the users’ requirements specification. We next check that all important
integrity constraints are represented by the logical data model. At this stage the logical
data model is validated by the users to ensure that they consider the model to be a true
representation of the data requirements of the enterprise.
The methodology for Step 2 is presented so that it is applicable for the design of simple
to complex database systems. For example, to create a database with a single user view or
with multiple user views that are managed using the centralized approach (see Section 9.5)
then Step 2.6 is omitted. If, however, the database has multiple user views that are being
managed using the view integration approach (see Section 9.5) then Steps 2.1 to 2.5 are
repeated for the required number of data models, each of which represents different user
views of the database system. In Step 2.6 these data models are merged.
Step 2 concludes with an assessment of the logical data model, which may or may not
have involved Step 2.6, to ensure that the final model is able to support possible future
developments. On completion of Step 2 we should have a single logical data model that
is a correct, comprehensive, and unambiguous representation of the data requirements of
the enterprise.
16.1 Logical Database Design Methodology for the Relational Model | 463
We demonstrate Step 2 using the conceptual data model created in the previous chapter
for the Staff user views of the DreamHome case study and represented in Figure 16.1 as
an ER diagram. We also use the Branch user views of DreamHome, which is represented
in Figure 12.8 as an ER diagram to illustrate some concepts that are not present in the Staff
user views and to demonstrate the merging of data models in Step 2.6.
Objective To create relations for the logical data model to represent the entities,
relationships, and attributes that have been identified.
In this step, we derive relations for the logical data model to represent the entities, rela-
tionships, and attributes. We describe the composition of each relation using a Database
Definition Language (DBDL) for relational databases. Using the DBDL, we first specify
the name of the relation followed by a list of the relation’s simple attributes enclosed in
brackets. We then identify the primary key and any alternate and/or foreign key(s) of the
relation. Following the identification of a foreign key, the relation containing the refer-
enced primary key is given. Any derived attributes are also listed together with how each
one is calculated.
The relationship that an entity has with another entity is represented by the primary key/
foreign key mechanism. In deciding where to post (or place) the foreign key attribute(s),
we must first identify the ‘parent’ and ‘child’ entities involved in the relationship. The
parent entity refers to the entity that posts a copy of its primary key into the relation that
represents the child entity, to act as the foreign key.
We describe how relations are derived for the following structures that may occur in a
conceptual data model:
(1) strong entity types;
(2) weak entity types;
(3) one-to-many (1:*) binary relationship types;
(4) one-to-one (1:1) binary relationship types;
(5) one-to-one (1:1) recursive relationship types;
(6) superclass/subclass relationship types;
(7) many-to-many (*:*) binary relationship types;
(8) complex relationship types;
(9) multi-valued attributes.
For most of the examples discussed below we use the conceptual data model for the
Staff user views of DreamHome, which is represented as an ER diagram in Figure 16.1.
rentFinish
/deposit
/duration
Figure 16.1 Conceptual data model for the Staff user views showing all attributes.
simple attributes, namely, fName and lName in the relation. For example, the composition
of the Staff relation shown in Figure 16.1 is:
Staff (staffNo, fName, lName, position, sex, DOB)
Primary Key staffNo
16.1 Logical Database Design Methodology for the Relational Model | 465
In this situation, the primary key for the Preference relation cannot be identified until after
the States relationship has been appropriately mapped.
In the case where a 1:* relationship has one or more attributes, these attributes should
follow the posting of the primary key to the child relation. For example, if the Staff Registers
Client relationship had an attribute called dateRegister representing when a member of staff
registered the client, this attribute should also be posted to the Client relation along with the
copy of the primary key of the Staff relation, namely staffNo.
In the case where a 1:1 relationship with mandatory participation on both sides has one or
more attributes, these attributes should also be included in the merged relation. For example,
if the States relationship had an attribute called dateStated recording the date the preferences
were stated, this attribute would also appear as an attribute in the merged Client relation.
Note that it is only possible to merge two entities into one relation when there are no
other direct relationships between these two entities that would prevent this, such as a 1:*
relationship. If this were the case, we would need to represent the States relationship using
the primary key/foreign key mechanism. We discuss how to designate the parent and child
entities in this type of situation in part (c) shortly.
Note that the foreign key attribute of the Preference relation also forms the relation’s
primary key. In this situation, the primary key for the Preference relation could not have
been identified until after the foreign key had been posted from the Client relation to the
Preference relation. Therefore, at the end of this step we should identify any new primary
key or candidate keys that have been formed in the process, and update the data dictionary
accordingly.
Table 16.1 Guidelines for the representation of a superclass/subclass relationship based on the
participation and disjoint constraints.
Figure 16.2
Various
representations
of the Owner
superclass/subclass
relationship based
on the participation
and disjointness
constraints shown
in Table 16.1.
For example, consider the *:* relationship Client Views PropertyForRent shown in
Figure 16.1. In this example, the Views relationship has two attributes called dateView
and comments. To represent this, we create relations for the strong entities Client and
PropertyForRent and we create a relation Viewing to represent the relationship Views, to give:
Note that the Registers relationship is shown as a binary relationship in Figure 16.1 and this
is consistent with its composition in Figure 16.3. The discrepancy between how Registers
is modeled in the Staff and Branch user views of DreamHome is discussed and resolved
in Step 2.6.
16.1 Logical Database Design Methodology for the Relational Model | 471
Entity/Relationship Mapping
Objective To validate the relations in the logical data model using normalization.
In the previous step we derived a set of relations to represent the conceptual data model
created in Step 1. In this step we validate the groupings of attributes in each relation using
the rules of normalization. The purpose of normalization is to ensure that the set of rela-
tions has a minimal and yet sufficient number of attributes necessary to support the data
requirements of the enterprise. Also, the relations should have minimal data redundancy
to avoid the problems of update anomalies discussed in Section 13.3. However, some
redundancy is essential to allow the joining of related relations.
The use of normalization requires that we first identify the functional dependencies that
hold between the attributes in each relation. The characteristics of functional dependencies
that are used for normalization were discussed in Section 13.4 and can only be identified
if the meaning of each attribute is well understood. The functional dependencies indicate
important relationships between the attributes of a relation. It is those functional depen-
dencies and the primary key for each relation that are used in the process of normalization.
The process of normalization takes a relation through a series of steps to check whether
or not the composition of attributes in a relation conforms or otherwise with the rules for
a given normal form such as First Normal Form (1NF), Second Normal Form (2NF),
and Third Normal Form (3NF). The rules for each normal form were discussed in detail
in Sections 13.6 to 13.8. To avoid the problems associated with data redundancy, it is
recommended that each relation be in at least 3NF.
The process of deriving relations from a conceptual data model should produce relations
that are already in 3NF. If, however, we identify relations that are not in 3NF, this may
indicate that part of the logical data model and/or conceptual data model is incorrect, or
that we have introduced an error when deriving the relations from the conceptual data
model. If necessary, we must restructure the problem relation(s) and/or data model(s) to
ensure a true representation of the data requirements of the enterprise.
It is sometimes argued that a normalized database design does not provide maximum
processing efficiency. However, the following points can be argued:
n A normalized design organizes the data according to its functional dependencies.
Consequently, the process lies somewhere between conceptual and physical design.
n The logical design may not be the final design. It should represent the database desig-
ner’s best understanding of the nature and meaning of the data required by the enter-
prise. If there are specific performance criteria, the physical design may be different.
One possibility is that some normalized relations are denormalized, and this approach
is discussed in detail in Step 7 of the physical database design methodology (see
Chapter 18).
n A normalized design is robust and free of the update anomalies discussed in Sec-
tion 13.3.
n Modern computers are much more powerful than those that were available a few years
ago. It is sometimes reasonable to implement a design that gains ease of use at the
expense of additional processing.
474 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
Objective To ensure that the relations in the logical data model support the required
transactions.
The objective of this step is to validate the logical data model to ensure that the model
supports the required transactions, as detailed in the users’ requirements specification.
This type of check was carried out in Step 1.8 to ensure that the conceptual data model
supported the required transactions. In this step, we check that the relations created in the
previous step also support these transactions, and thereby ensure that no error has been
introduced while creating relations.
Using the relations, the primary key/foreign key links shown in the relations, the ER
diagram, and the data dictionary, we attempt to perform the operations manually. If we
can resolve all transactions in this way, we have validated the logical data model against
the transactions. However, if we are unable to perform a transaction manually, there must
be a problem with the data model, which has to be resolved. In this case, it is likely that
an error has been introduced while creating the relations, and we should go back and check
the areas of the data model that the transaction is accessing to identify and resolve the
problem.
Objective To check integrity constraints are represented in the logical data model.
Integrity constraints are the constraints that we wish to impose in order to protect the
database from becoming incomplete, inaccurate, or inconsistent. Although DBMS controls
for integrity constraints may or may not exist, this is not the question here. At this stage
we are concerned only with high-level design, that is, specifying what integrity constraints
are required, irrespective of how this might be achieved. A logical data model that includes
all important integrity constraints is a ‘true’ representation of the data requirements for the
enterprise. We consider the following types of integrity constraint:
n required data;
n attribute domain constraints;
n multiplicity;
n entity integrity;
n referential integrity;
n general constraints.
16.1 Logical Database Design Methodology for the Relational Model | 475
Required data
Some attributes must always contain a valid value; in other words, they are not allowed
to hold nulls. For example, every member of staff must have an associated job position
(such as Supervisor or Assistant). These constraints should have been identified when we
documented the attributes in the data dictionary (Step 1.3).
Multiplicity
Multiplicity represents the constraints that are placed on relationships between data in
the database. Examples of such constraints include the requirements that a branch has
many staff and a member of staff works at a single branch. Ensuring that all appropriate
integrity constraints are identified and represented is an important part of modeling the
data requirements of an enterprise. In Step 1.2 we defined the relationships between
entities, and all integrity constraints that can be represented in this way were defined and
documented in this step.
Entity integrity
The primary key of an entity cannot hold nulls. For example, each tuple of the Staff
relation must have a value for the primary key attribute, staffNo. These constraints should
have been considered when we identified the primary keys for each entity type (Step 1.5).
Referential integrity
A foreign key links each tuple in the child relation to the tuple in the parent relation
containing the matching candidate key value. Referential integrity means that if the
foreign key contains a value, that value must refer to an existing tuple in the parent
relation. For example, consider the Staff Manages PropertyForRent relationship. The staffNo
attribute in the PropertyForRent relation links the property for rent to the tuple in the Staff
relation containing the member of staff who manages that property. If staffNo is not null,
it must contain a valid value that exists in the staffNo attribute of the Staff relation, or the
property will be assigned to a non-existent member of staff.
There are two issues regarding foreign keys that must be addressed. The first considers
whether nulls are allowed for the foreign key. For example, can we store the details of a
property for rent without having a member of staff specified to manage it (that is, can we
specify a null staffNo)? The issue is not whether the staff number exists, but whether a staff
number must be specified. In general, if the participation of the child relation in the
relationship is:
476 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
n SET DEFAULT When a parent tuple is deleted, the foreign key values in all cor-
responding child tuples should automatically be set to their default values. In our
example, ‘If a member of staff is deleted, indicate that the current assignment of some
properties is being handled by another (default) member of staff such as the Manager’.
We can only consider this strategy if the attributes comprising the foreign key have
default values defined.
n NO CHECK When a parent tuple is deleted, do nothing to ensure that referential
integrity is maintained.
Figure 16.4
Referential integrity
constraints for the
relations in the Staff
user views of
DreamHome.
478 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
General constraints
Finally, we consider constraints known as general constraints. Updates to entities may be
controlled by constraints governing the ‘real world’ transactions that are represented by
the updates. For example, DreamHome has a rule that prevents a member of staff from
managing more than 100 properties at the same time.
Objective To review the logical data model with the users to ensure that they con-
sider the model to be a true representation of the data requirements of the
enterprise.
The logical data model should now be complete and fully documented. However, to
confirm this is the case, users are requested to review the logical data model to ensure that
they consider the model to be a true representation of the data requirements of the enter-
prise. If the users are dissatisfied with the model then some repetition of earlier steps in the
methodology may be required.
If the users are satisfied with the model then the next step taken depends on the number
of user views associated with the database and, more importantly, how they are being
managed. If the database system has a single user view or multiple user views that are
being managed using the centralization approach (see Section 9.5) then we proceed
directly to the final step of Step 2, namely Step 2.7. If the database has multiple user
views that are being managed using the view integration approach (see Section 9.5) then
we proceed to Step 2.6. The view integration approach results in the creation of several
logical data models each of which represents one or more, but not all, user views of a
database. The purpose of Step 2.6 is to merge these data models to create a single logical
data model that represents all user views of a database. However, before we consider
this step we discuss briefly the relationship between logical data models and data flow
diagrams.
Step 2.6 Merge logical data models into global model (optional step)
Objective To merge local logical data models into a single global logical data model
that represents all user views of a database.
This step is only necessary for the design of a database with multiple user views that are
being managed using the view integration approach. To facilitate the description of the
merging process we use the terms ‘local logical data model’ and ‘global logical data
model’. A local logical data model represents one or more but not all user views of a
database whereas global logical data model represents all user views of a database. In this
step we merge two or more local logical data models into a single global logical data model.
The source of information for this step is the local data models created through Step 1
and Steps 2.1 to 2.5 of the methodology. Although each local logical data model should
be correct, comprehensive, and unambiguous, each model is only a representation of one
or more but not all user views of a database. In other words, each model represents only
part of the complete database. This may mean that there are inconsistencies as well as
overlaps when we look at the complete set of user views. Thus, when we merge the local
logical data models into a single global model, we must endeavor to resolve conflicts
between the views and any overlaps that exist.
Therefore, on completion of the merging process, the resulting global logical data
model is subjected to validations similar to those performed on the local data models. The
validations are particularly necessary and should be focused on areas of the model which
are subjected to most change during the merging process.
The activities in this step include:
n Step 2.6.1 Merge local logical data models into global model
n Step 2.6.2 Validate global logical data model
n Step 2.6.3 Review global logical data model with users
We demonstrate this step using the local logical data model developed above for the Staff
user views of the DreamHome case study and using the model developed in Chapters 11
and 12 for the Branch user views of DreamHome. Figure 16.5 shows the relations created
from the ER model for the Branch user views given in Figure 12.8. We leave it as an
exercise for the reader to show that this mapping is correct (see Exercise 16.6).
Objective To merge local logical data models into a single global logical data model.
Up to this point, for each local logical data model we have produced an ER diagram,
a relational schema, a data dictionary, and supporting documentation that describes the
480 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
constraints on the data. In this step, we use these components to identify the similarities
and differences between the models and thereby help merge the models together.
For a simple database system with a small number of user views each with a small
number of entity and relationship types, it is a relatively easy task to compare the
local models, merge them together, and resolve any differences that exist. However, in a
large system, a more systematic approach must be taken. We present one approach that
may be used to merge the local models together and resolve any inconsistencies found.
For a discussion on other approaches, the interested reader is referred to the papers by
Batini and Lanzerini (1986), Biskup and Convent (1986), Spaccapietra et al. (1992) and
Bouguettaya et al. (1998).
16.1 Logical Database Design Methodology for the Relational Model | 481
Table 16.3 A comparison of the names of entities/relations and their candidate keys in the
Branch and Staff user views.
Branch branchNo
postcode
Telephone telNo
Staff staffNo Staff staffNo
Manager staffNo
PrivateOwner ownerNo PrivateOwner ownerNo
BusinessOwner bName BusinessOwner bName
telNo telNo
ownerNo
Client clientNo Client clientNo
PropertyForRent propertyNo PropertyForRent propertyNo
Viewing clientNo, propertyNo
Lease leaseNo Lease leaseNo
propertyNo, propertyNo,
rentStart rentStart
clientNo, rentStart clientNo, rentStart
Registration clientNo
Newspaper newpaperName
telNo
Advert (propertyNo,
newspaperName,
dateAdvert)
foreign keys that are common to each view are highlighted. Note, in particular, that of the
relations that are common to both views, the Staff and PropertyForRent relations have an
extra foreign key, branchNo.
This initial comparison of the relationship names/foreign keys in each view again gives
some indication of the extent to which the views overlap. However, it is important to
recognize that we should not rely too heavily on the fact that entities or relationships with
the same name play the same role in both views. However, comparing the names of
entities/relations and relationships/foreign keys is a good starting point when searching
for overlap between the views, as long as we are aware of the pitfalls.
We must be careful of entities or relationships that have the same name but in fact
represent different concepts (also called homonyms). An example of this occurrence
is the Staff Manages PropertyForRent (Staff view) and Manager Manages Branch (Branch
view). Obviously, the Manages relationship in this case means something different in
each view.
Table 16.4 A comparison of the foreign keys in the Branch and Staff user views.
Child relation Foreign keys Parent relation Child relation Foreign keys Parent relation
c
The Advert relation is created from the many-to-many (*;*) relationship Advertises
|
483
484 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
We must therefore ensure that entities or relationships that have the same name rep-
resent the same concept in the ‘real world’, and that the names that differ in each view
represent different concepts. To achieve this, we compare the attributes (and, in particular,
the keys) associated with each entity and also their associated relationships with other
entities. We should also be aware that entities or relationships in one view may be repres-
ented simply as attributes in another view. For example, consider the scenario where the
Branch entity has an attribute called managerName in one view, which is represented as an
entity called Manager in another view.
n merging entities/relations with the same name and the same primary key;
n merging entities/relations with the same name but different primary keys;
n merging entities/relations with different names using the same or different primary
keys.
Merging entities/relations with the same name and the same primary key
Generally, entities/relations with the same primary key represent the same ‘real world’
object and should be merged. The merged entity/relation includes the attributes from the
original entities/relations with duplicates removed. For example, Figure 16.6 lists the
attributes associated with the relation PrivateOwner defined in the Branch and Staff user
views. The primary key of both relations is ownerNo. We merge these two relations
together by combining their attributes, so that the merged PrivateOwner relation now has all
the original attributes associated with both PrivateOwner relations. Note that there is conflict
between the views on how we should represent the name of an owner. In this situation, we
should (if possible) consult the users of each view to determine the final representation.
Note, in this example, we use the decomposed version of the owner’s name, represented
by the fName and lName attributes, in the merged global view.
Figure 16.6
Merging the
PrivateOwner
relations from the
Branch and Staff
user views.
16.1 Logical Database Design Methodology for the Relational Model | 485
In a similar way, from Table 16.2 the Staff, Client, PropertyForRent, and Lease relations
have the same primary keys in both views and the relations can be merged as discussed
above.
Merging entities/relations with the same name but different primary keys
In some situations, we may find two entities/relations with the same name and similar
candidate keys, but with different primary keys. In this case, the entities/relations should
be merged together as described above. However, it is necessary to choose one key to be
the primary key, the others becoming alternate keys. For example, Figure 16.7 lists the
attributes associated with the two relations BusinessOwner defined in the two views. The
primary key of the BusinessOwner relation in the Branch user views is bName and the pri-
mary key of the BusinessOwner relation in the Staff user views is ownerNo. However, the
alternate key for BusinessOwner in the Staff user views is bName. Although the primary
keys are different, the primary key of BusinessOwner in the Branch user views is the
alternate key of BusinessOwner in the Staff user views. We merge these two relations
together as shown in Figure 16.7 and include bName as an alternate key.
An obvious example of this occurrence would be entities called Staff and Employee, which
if found to be equivalent should be merged.
Figure 16.7
Merging the
BusinessOwner
relations with
different primary
keys.
486 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
Figure 16.8 Relations that represent the global logical data model for DreamHome.
488 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
Objective To validate the relations created from the global logical data model using
the technique of normalization and to ensure they support the required
transactions, if necessary.
This step is equivalent to Steps 2.2 and 2.3, where we validated each local logical data
model. However, it is only necessary to check those areas of the model that resulted in any
change during the merging process. In a large system, this will significantly reduce the
amount of rechecking that needs to be performed.
Objective To review the global logical data model with the users to ensure that they
consider the model to be a true representation of the data requirements of
an enterprise.
The global logical data model for the enterprise should now be complete and accurate. The
model and the documentation that describes the model should be reviewed with the users
to ensure that it is a true representation of the enterprise.
16.1 Logical Database Design Methodology for the Relational Model | 489
To facilitate the description of the tasks associated with Step 2.6 it is necessary to use the
terms ‘local logical data model’ and ‘global logical data model’. However, at the end of
this step when the local data models have been merged into a single global data model, the
distinction between the data models that refer to some or all user views of a database is
no longer necessary. Therefore on completion of this step we refer to the single global
data model using the simpler term of ‘logical data model’ for the remaining steps of the
methodology.
Objective To determine whether there are any significant changes likely in the fore-
seeable future and to assess whether the logical data model can accom-
modate these changes.
Logical database design concludes by considering whether the logical data model (which
may or may not have been developed using Step 2.6) is capable of being extended to sup-
port possible future developments. If the model can sustain current requirements only, then
the life of the model may be relatively short and significant reworking may be necessary
to accommodate new requirements. It is important to develop a model that is extensible and
has the ability to evolve to support new requirements with minimal effect on existing users.
Of course, this may be very difficult to achieve, as the enterprise may not know what it
wants to do in the future. Even if it does, it may be prohibitively expensive both in time
and money to accommodate possible future enhancements now. Therefore, it may be
necessary to be selective in what is accommodated. Consequently, it is worth examining
the model to check its ability to be extended with minimal impact. However, it is not
necessary to incorporate any changes into the data model unless requested by the user.
At the end of Step 2 the logical data model is used as the source of information for
physical database design, which is described in the following two chapters as Steps 3 to 8
of the methodology.
For readers familiar with database design, a summary of the steps of the methodology
is presented in Appendix G.
Chapter Summary
n The database design methodology includes three main phases: conceptual, logical, and physical database
design.
n Logical database design is the process of constructing a model of the data used in an enterprise based on a
specific data model but independent of a particular DBMS and other physical considerations.
n A logical data model includes ER diagram(s), relational schema, and supporting documentation such as the
data dictionary, which is produced throughout the development of the model.
Review Questions | 491
n The purpose of Step 2.1 of the methodology for logical database design is to derive a relational schema from
the conceptual data model created in Step 1.
n In Step 2.2 the relational schema is validated using the rules of normalization to ensure that each relation is
structurally correct. Normalization is used to improve the model so that it satisfies various constraints that
avoids unnecessary duplication of data. In Step 2.3 the relational schema is also validated to ensure it supports
the transactions given in the users’ requirements specification.
n In Step 2.4 the integrity constraints of the logical data model are checked. Integrity constraints are the con-
straints that are to be imposed on the database to protect the database from becoming incomplete, inaccurate,
or inconsistent. The main types of integrity constraints include: required data, attribute domain constraints,
multiplicity, entity integrity, referential integrity, and general constraints.
n In Step 2.5 the logical data model is validated by the users.
n Step 2.6 of logical database design is an optional step and is only required if the database has multiple user
views that are being managed using the view integration approach (see Section 9.5), which results in the cre-
ation of two or more local logical data models. A local logical data model represents the data requirements
of one or more, but not all, user views of a database. In Step 2.6 these data models are merged into a global
logical data model which represents the requirements of all user views. This logical data model is again
validated using normalization, against the required transaction, and by users.
n Logical database design concludes with Step 2.7, which considers whether the model is capable of being
extended to support possible future developments. At the end of Step 2, the logical data model, which may or
may not have been developed using Step 2.6, is the source of information for physical database design
described as Steps 3 to 8 in Chapters 17 and 18.
Review Questions
16.1 Discuss the purpose of logical database 16.3 Discuss how the technique of normalization can
design. be used to validate the relations derived from the
16.2 Describe the rules for deriving relations that conceptual data model.
represent: 16.4 Discuss two approaches that can be used to
(a) strong entity types; validate that the relational schema is capable of
(b) weak entity types; supporting the required transactions.
(c) one-to-many (1:*) binary relationship types; 16.5 Describe the purpose of integrity constraints and
(d) one-to-one (1:1) binary relationship types; identify the main types of integrity constraints on a
(e) one-to-one (1:1) recursive relationship types; logical data model.
(f) superclass/subclass relationship types; 16.6 Describe the alternative strategies that can be
(g) many-to-many (*:*) binary relationship applied if there exists a child tuple referencing a
types; parent tuple that we wish to delete.
(h) complex relationship types; 16.7 Identify the tasks typically associated with
(i) multi-valued attributes. merging local logical data models into a global
Give examples to illustrate your answers. logical model.
492 | Chapter 16 z Methodology – Logical Database Design for the Relational Model
Exercises
16.8 Derive relations from the following conceptual data model: