Lecture 2 - Database Design
Lecture 2 - Database Design
Database Design
Roi Yehoshua
Agenda
Database design principles
The entity-relationship (ER) model
Reducing ER diagrams to relational schemas
Functional dependencies
Normal forms
instructor department
ID inst_dept dept_name
name building
salary budget
manager department
ID dept_mgr dept_name
name building
salary budget
instructor course
ID teaches course_id
name title
salary credits
Partial participation: some entities may not participate in any relationship in the
relationship set
For example, participation of instructor in advisor is partial
i.e., an instructor need not advise any students
instructor course
ID teaches course_id teaches (ID, course_ID)
name title
salary credits
All of the attributes that are not part of the candidate key depend only on Title
However, Price also depends on Format
Thus, the table doesn’t satisfy 2NF