Chapter 04 Database Learning Skills
Chapter 04 Database Learning Skills
Databases
Chapter 4:
Designing a
Database
Designing Relational
Tables
Converting Binary
Relationships
Converting one-to-one
Salesperson/Office relationship
Options:
Convert relationship to
single/combined table
Convert relationship to two tables
Considerations:
Business environment considers
Salesperson and Office as separate
entities
Modality of zero at Salesperson entity in
E-R diagram (office may have no one
assigned)
Salesperson entity in E-R diagram has
relationships with other entities
Solution 1:
Combine two entities into one table
Solution 2:
Solution 3:
Two separate tables
Salesperson Number as foreign key in
Office table
With:
Only one entity type involved, and
One-to-one relationship
Normalizing Data
Data normalization: Methodology for
organizing attributes into tables to
eliminate redundancy among nonkey
attributes
Goals:
Each resultant table describes single entity
type or single many-to-many relationship
Foreign keys appear exactly where needed
Properly structured relational database
Normalization
Techniques
Two types of input needed for data
normalization process
1. List of all attributes to be incorporated in
database, including intersection data attributes
2. List of functional dependencies: all defining
associations between attributes
Normalizing Data
Normal forms: Rules for data normalization
Three main normal forms
Normalization:
Normalizing Data
Example: Unnormalized
Data
Denormalizing Data
Denormalizing may be needed when:
Normalization has been taken to extreme
Too many small tables creating more work and
storage space
E.g. Using State table to be referenced instead of
entering two-digit code)
Summary
In converting E-R diagrams to relational
tables, each entity typically converted into
table, with attributes as table columns.
Considerations in conversion: Business
needs, cardinalities, modalities, and defining
foreign keys to establish relationships.
Normalization: Uses three main normal forms
to step through decomposing attributes
into subgroups that allow data redundancies
to be eliminated.
Denormalizing may be needed in cases where
storage space and speed of data retrieval are
important factors.
Key Terms
Composite key
Data integrity
Data normalization
Decomposition process
Defining association
Determinant attribute
Exception conditions
First normal form
Functional dependency
Joining
Non-loss
decomposition
Normal forms
Null value
Partial functional
dependency
Referential integrity
Relational integrity
Second normal form
Third normal form
(3NF)
Transitive dependency
Copyright Notice
Copyright 2008 John Wiley & Sons, Inc.
All rights reserved. Reproduction or translation of this
work beyond that permitted in section 117 of the 1976
United States Copyright Act without express
permission of the copyright owner is unlawful.
Requests for further information should be addressed
to the Permissions Department, John Wiley & Sons,
Inc. The purchaser may make back-up copies for
his/her own use only and not for distribution or resale.
The Publisher assumes no responsibility for errors,
omissions, or damages caused by the use of these
programs or from the use of the information herein.