csce520-lect4 - FunctionalDependencies ReadingandExercises

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Functional Dependencies
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Farkas CSCE 520  2 Reading and Exercises Database Systems- The Complete Book: Chapter 3.1, 3.2, 3.3., 3.4 Following lecture slides are modified from Jeff Ullman’s slides for Fall 2002 --  Stanford
Background image of page 2
Farkas CSCE 520  3 Database Design Goal: Represent domain information  Avoid anomalies  Avoid redundancy Anomalies: Update : not all occurrences of a fact are changed Deletion : valid fact is lost when tuple is deleted
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Farkas CSCE 520  4 Functional Dependencies FD: X   A for relation R X functional determines A, i.e., if any two tuples in  R agree on attributes X, they must also agree on  attribute A. X: set of attributes A: single attribute If t 1  and t 2  are two tuples of r over R and t 1 [X]=  t 2 [X] then t 1 [A]= t 2 [A]  What is the relation between functional  dependencies and primary keys?
Background image of page 4
Farkas CSCE 520  5 Functional Dependency Example Owner(Name, Phone) FD: Name   Phone Dog(Name, Breed, Age, Weight) FD: Name, Breed   Age FD: Name, Breed   Weight
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Farkas CSCE 520  6 Example - FD Name Breed Age Weight Date Kennel Pepper G.S. 1 70 01/01/02 White Oak Buddy Mix 4 50 03/04/01 Little Creek Pepper G.S. 1 70 04/17/02 Little Creek Panka Vizsla 12 40 02/14/02 White Oak Functional Dependencies: Name,Breed Age Name,Breed Weight Dog-Kennels(Name,Breed,Age,Weight,Date,Kennel)
Background image of page 6
Farkas CSCE 520  7 FD with Multiple Attributes Right side: can be more than 1 attribute –  splitting/combining rule E.g.,  FD: Name, Breed   Age FD: Name, Breed   Weight combine into:  FD: Name, Breed   Age,Weight Left side cannot be decomposed!
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/13/2011 for the course CSCE 520 taught by Professor Farkas during the Spring '11 term at South Carolina.

Page1 / 26

csce520-lect4 - FunctionalDependencies ReadingandExercises

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online