INTRODUCTION TO RELATIONAL DATABASES
The Problem with Flat File Databases
EMPLOYEE INFO TABLE
FIRST NAME LAST NAME
Text Box: Look how massive duplication of information can occur.
 - increases file size
 - increases search time
DEPT
Joe Hanley HR
Fred Hanrahan Sales
Sam Hill Production Sales
Sidney Hopper Mktg
Bill Kaiser Sales
Sherry Lane Sales HR
Janet Lavin HR
Sergio Lopez Mktg
Gillian Roberts HR Mktg
Clarence Tomkins Mktg
Fritz Webb Mktg
The Solution
Wouldn't it be nice to just store these values a single time.
 - in a separate table
Then you could call them up when you needed them.
DEPARTMENT CODES TABLE
DEPARTMENT
Sales
HR
Mktg
Production
Relations Between Tables
EMPLOYEE INFO TABLE DEPARTMENT CODES TABLE
FIRST NAME
    DEPARTMENT  
LAST NAME    
DEPT    
Cloud Callout: I'll store my DEPT values in the DEPARTMENT FIELD over there, and just call them up when they are needed.  I feel slimmer already!
EMPLOYEE INFO TABLE DEPARTMENT CODES TABLE
FIRST NAME  
 
DEPARTMENT  
LAST NAME    
DEPT    
The One-to-Many Relation
One of the classic types of relations is the "One-Many" relationship.
 - store a value once, re-use it many times
 - there are other (less widely used) types of relations
EMPLOYEE INFO TABLE DEPARTMENT CODES TABLE
FIRST NAME
 
  DEPARTMENT  
LAST NAME    
DEPT