Constraints and Functional Dependencies




CS157a

Chris Pollett

Sep 17, 2018

Outline

Introduction

Constraints on Relations

Relational Algebra as a Constraint Language

Referential Integrity Constraints

Key Constraints

Other Kinds of Constraints

Quiz

Which of the following is true?

  1. The command to delete a SQL table is DELETE TABLE.
  2. A SQL table can have more than one primary key.
  3. The relational algebra select operation applied to R makes a new relation with only the listed columns in the select of R.

Database Design Theory

Definition of a Function Dependency

Keys of a Relation

Reasoning About Functional Dependencies