Data Base Normalization and ERD
Data Base Normalization and ERD
And
Entity Relationship Diagrams
10/6/15
Normalization
10/6/15
1 Normal Form
st
10/6/15
Book
Title
Author1
Author2
Fields
ISBN
Subject
Pages
Publisher
10/6/15
Title
Database
System
Concepts
Operating
System
Author1
Author2 ISBN
Subject
Pag Publish
es
er
1 Normal Form
st
Author2
ISBN
Henry F. 729588
Korth
63
Henry F. 471694
Korth
665
Subject
MySQL,
Computers
Pages
Computers
944
1168
Publisher
McGrawHill
McGrawHill
ISBN
Subject
Pages
72958863 MySQL
1168
Comput
72958863
ers
1168
47169466 Comput
5
ers
944
47169466 Comput
5 book.
ersAdditionally,
944
single
Publisher
McGrawHill
McGrawHill
McGrawHill
McGrawwe Hill
Authors Table
Subject_ID
Subject
Author_I
D
MySQL
Computers
First
Last Name
Name
Abraha
Silberschatz
m
Korth
Henry
Books Table
ISBN
72958863
471694665
10/6/15
Pag
Title
es Publisher
Database System 116 McGrawConcepts
8
Hill
Operating System
McGrawConcepts
944
Hill
7
nd
Normal Form
nd
Normal Form
Publisher Table
Publisher_ID
Publisher Name
McGraw-Hill
Books Table
ISBN
Page Publisher_I
s
D
Title
Database System
72958863
Concepts
1168
1
Here we have a one-to-many relationship between the book table
Operating System
and the publisher. A book has only one publisher, and a publisher
471694665
Concepts
944
1
will publish many books. When we have a one-to-many
relationship, we place a foreign key in the Book Table, pointing to
the primary key of the Publisher Table.
10/6/15
3 Normal Form
rd
10/6/15
10
Entity Relationship
Diagrams
10/6/15
11
12
Mandatory Relationships
Optional Relationships
Many-to-Many Relationships
One-to-Many Relationships
One-to-One Relationships
Recursive Relationships
10/6/15
13
Mandatory, Many-to-Many
10/6/15
INSTRUCTOR
STUDENT
INSTRUCTOR
STUDENT
14
Optional, Many-to-Many
10/6/15
DEPARTMENT
STUDENT
DEPARTMENT
STUDENT
15
Optional/Mandatory,
Many-to-Many
10/6/15
INSTRUCTOR
SKILL
INSTRUCTOR
SKILL
16
Optional/Mandatory,
One-to-Many
10/6/15
PRODUCT
VENDOR
PRODUCT
VENDOR
17
Mandatory, One-to-One
10/6/15
AUTOMOBILE
ENGINE
AUTOMOBILE
ENGINE
18
Recursive
EMPLOYEE
supervises
is supervised by
10/6/15
19
Resolving Many-to-Many
Relationships
Many-to-many relationships should
be avoided. We can resolve a manyto-many relationship by dividing it
into two one-to-many relationships.
10/6/15
20
Resolving Many-to-Many
Relationships
SALES ORDERS
SALES ORDERS
10/6/15
INV. ITEMS
ORDER ITEMS
INV. ITEMS
21
CLERKS
SALES ORDERS
ORDER ITEMS
10/6/15
INV. ITEMS
22
HR Schema ER Diagram