Lecture 5 & 6 - Database Design
Lecture 5 & 6 - Database Design
Database Design
Motivation - Why Model?
Understand/
Model Comprehend Control
Analysis &
Presentation
Conceptualization
Why Design & Organize?
• DATA
Unorganized form
Eg. student’s Score
• INFORMATION
processed, structured and
organized data
Eg. class average which can be
calculated from data.
Phases of Database Design
Logical
• ER Diagram Design • Tablespaces
• UML • Tables • Indexes
• Columns
Conceptual Physical
Design Design
Why ER Diagrams?
• Giving you image of how the tables should connect.
EMPLOYEE PROJECT
ER Diagram Symbols and Notations
Examples of Entities
Number State
Key Attributes (Cont.)
An entity type
may have
more than
one key.
Nested Composite Attribute
Types of Attributes - Notation
Example – Different Attributes
Key
Attribute
Composite Multi-valued
Attribute Attribute
Age
Simple Derived
Attribute Attribute
Relationship
MANAGES
Degree of Relationship
Degree
(number of entity types that participate in a relationship)