Professional Documents
Culture Documents
Ian F. C. Smith
EPFL, Switzerland
1/77
Module Information
Intended audience
Beginners
Intermediate
Key words
Data storage, data manipulation
Relational data base
Functional dependencies
Normal forms
Update anomalies
Authors:
Ian Smith, EPFL, Switzerland
Reviewers:
Carlos Caldas, University of Texas Austin, USA
Guillermo Salazar, Worcester Polytechnic
Institute, USA
2/77
Review Board:
3/77
Introduction
The amount of digital information related to civil
engineering is increasing exponentially. For example,
it is now standard practice to have the following
information in digital form:
Results of design calculations
Simulation data (structural analysis, traffic model
simulations, energy use, landslides, snow
accumulation, etc.)
Drawings
4/77
Introduction (contd.)
Measurement data (energy use, traffic, loading,
deformations, corrosion, humidity, hydraulic
information, etc.)
Experimental results
Geographical information
Geological data
Weather data
Cost data
Product models
5/77
6/77
6
7/777
8/77
9/77
Computer
User
Interaction
Data Base
Management
System
DB
10/77
Hierarchical
Relational (most widely used today)
Object-oriented
Logic-based
Distributed
Multimedia
11/77
12/77
13/77
14/77
2.
3.
4.
15/77
16/77
Review Quiz - I
Why are data bases important?
What are three advantages of having structured
data?
What are good conditions for using a relational
model?
17/77
18/77
Outline
Introduction
Example
Functional Dependencies
Normal Forms
Why use Normal Forms?
19/77
2.
3.
4.
21/77
22/77
23/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
Outline
Introduction
Example
Functional Dependencies
Normal Forms
Why use Normal Forms?
25/77
Functional Dependencies
When the value for attribute y always defines the
value for attribute z, we say that z is functionally
dependent on y.
Algebraically:
yz
26/77
Terminology
Primary key: An attribute in a table is called the
primary key if its values uniquely identify the other
values in the table.
Composite primary key : The combination of two or
more values in attributes uniquely identifies the other
values in the table.
27/77
Owner
Design File Location
Design Part
Office
Dwg. File Location
Structure
Owner
Design File Location
Design Part
Office
Dwg. File Location
29/77
Structure
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
30/77
Structure
Owner
Design File Location
Design Part
Office
Dwg. File Location
31/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
32/77
Structure
Owner
Design File Location
Design Part
Office
Dwg. File Location
33/77
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1 Server 2
Bank A
Steel
Structure
Atlanta
Server 2 Server 3
Bridge D
Piers
Houston
Server 3 Server 2
Bridge D
Deck
Office C
Top floors
Atlanta
Server 2 Server 3
Bridge F
Abutments
Boston
Server 2 Server 1
34/77
Outline
Introduction
Example
Functional Dependencies
Normal Forms
Why use Normal Forms?
35/77
Normal Forms
This course describes three normal forms
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Each increment in form includes requirements of
the previous form.
For this course, the highest possible normal form is
given to the examples.
36/77
Structure
Owner
Design File Location
Design Part
Office
Dwg. File Location
37/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
40/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
XYnew
Piers
Houston Server 3
Server 2
Bridge D
XYnew
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
41/77
42/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
43/77
Design
File
Location
Drawing
File
Location
Structure
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
44/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
46/77
Office
Design
File
Location
Drawing
File
Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
Building R
*error*
*error*
*error*
*error*
47/77
Owner
Structure
Office
Design Part
Owner
School A
Bank A
Bridge D
Office C
Bridge F
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
49/77
50/77
51/77
Owner
School A
Bank A
Bridge D
Office C
Bridge F
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Bank A
Steel
Structure
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Bridge F
Abutments
Boston
Server 2
Server 2
Server 1
52/77
Owner
School A
Bank A
Bridge D
Office C
Bridge F
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Bank A
Steel
Structure
Bridge D
Piers
Houston Server 3
Server 2
Bridge D
Deck
Portland Server 1
Server 3
Office C
Top floors
Bridge F
Abutments
Boston
Server 2
Server 2
Server 1
53/77
54/77
Owner
School A
Bank A
Bridge D
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Server 2
Steel
Structure
Atlanta
Server 2
Server 3
Office C
Bank A
Bridge F
Bridge D
Piers
Bridge D
Deck
Portland
Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
55/77
Owner
School A
Bank A
Bridge D
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Server 2
Steel
Structure
Atlanta
Server 2
Server 3
Office C
Bank A
Bridge F
Bridge D
Deck
Portland
Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
56/77
57/77
Owner
School A
Bank A
Bridge D
Office C
Bridge F
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Q Bridge D
Piers
Houston
Server 3
Server 2
Bridge D
Deck
Portland
Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
58/77
Owner
School A
Bank A
Bridge D
Office C
Bridge F
Q Bridge D
Bridge D
Structure
Design
Part
Office
Design
Drawing
File
File
Location Location
School A
Foundation
Detroit
Server 1
Server 2
Bank A
Steel
Structure
Atlanta
Server 2
Server 3
Piers
Houston
Server 3
Server 2
Deck
Portland
Server 1
Server 3
Office C
Top floors
Atlanta
Server 2
Server 3
Bridge F
Abutments
Boston
Server 2
Server 1
*error*
*error*
New
York
Server 5
Server 7
59/77
Owner
Structure
Office
Design Part
Design File Location
Office
Dwg. File Location
60/77
61/77
Owner
School A
Structure
Design
Part
Bank A
Bridge D
School A
Foundation
Office C
Bank A
Bridge F
Steel
Structure
Bridge D
Office
Detroit
Office
Atlanta
Design
File
Location
Drawing
File
Location
Piers
Detroit
Houston
Server 1
Server 2
Bridge D
Deck
Portland
Atlanta
4
Server 2
Server 3
Office C
Top floors
Bridge F
Abutments
Atlanta
Houston
Boston
Portland
Server 3
Server 2
Server 1
Server 3
Boston
Server 2
Server 1
New York
Server 5
Server 7
62/77
Office
Design part
Office
Design part
64/77
Owner
Office
School A
Detroit
Bank A
Atlanta
Bridge D
Houston
Office C
Portland
Bridge F
Office
Design Part
Design File
Location
Detroit
Foundation
Server 1
Server 2
Server 4
Server 3
Boston
Steel
Part
Atlanta
Structure
Design
Part Structure
ID
School A
Atlanta
Foundation
Piers
Server 3
Server 2
Bank A
Deck
SteelPortland
Structure
Server 1
Server 3
Bridge D
PiersBoston
Top floors
Server 2
Server 1
Bridge D
DeckNew
Abutments
Server 5
Server 7
Office C
Top floors
Bridge F
Abutments
York
65/77
66/77
Structure
Office
Part ID
Design part
67/77
Owner
Office
School A
Detroit
Bank A
Atlanta
Bridge D
Houston
Office C
Portland
Bridge F
Design
Drawing
File
File
Location Location
Detroit
Server 1
Server 2
Server 4
Server 3
Server 3
Server 2
Server 1
Server 3
Server 2
Server 1
Server 5
Server 7
Boston
Atlanta
Part
Structure
Design Part
ID
Houston
School A
1
Foundation
Portland
Bank A
5
Steel Structure
Boston
Bridge D
2
Piers
New
Bridge D
3
Deck
York
Office C
6
Top floors
Bridge F
Abutments
68/77
69/77
Review Quiz - II
Define
Primary key
Composite key
Name three update anomalies that can occur in the first
and second normal forms?
Which normal form is the best? Why?
What inherent information do functional dependencies
contain?
70/77
71/77
do
functional
72/77
Outline
Introduction
Example
Functional Dependencies
Normal Forms
Why use Normal Forms?
73/77
75/77
Further Reading
Date, C. J. An Introduction to Database Management
Systems, Addison Wesley, 1995
Bhavani M. T., Data Management Systems, CRC
Press, 1997
Raphael, B. and Smith, I.F.C. Fundamentals of
Computer-Aided Engineering, Wiley, 2003
77/77