354.DesignTheory

# 354.DesignTheory - Database Systems I Design Theory for...

This preview shows pages 1–4. Sign up to view the full content.

CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 227 Database Systems I Design Theory for Relational Databases CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 228 Introduction Typically, the first database design uses a high-level database model such as the ER model. This model is then translated into a relational schema. Sometimes a relational database schema is developed directly without going through the high-level design. Either way, the initial relational schema has room for improvement, in particular by eliminating redundancy . Redundancies lead to undesirable update and deletion anomalies . Relational database design theory introduces various normal forms of a schema that avoid various types of redundancies and algorithms to convert a relational schema into these normal forms.

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

View Full Document
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 229 Functional Dependency Normal forms are based on the concept of functional dependencies between sets of attributes. A functional dependency ( FD ) X Y is an assertion about a relation R that whenever two tuples of R agree on all the attributes of set X , then they must also agree on all attributes in set Y . We say “ X Y holds in R .” Convention: …, X , Y , Z represent sets of attributes of relation R . A , B , C ,… represent single attributes of R . Convention: no parentheses to denote sets of attributes, just ABC , rather than { A , B , C }. A FD X Y is called trivial if . X Y CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 230 Splitting / Combining Rule X A 1 A 2 A n holds for R if and only if each of X A 1 , X A 2 ,…, X A n hold for R . Example: The FD A BC is equivalent to the two FDs A B and A C . This rule can be used to split a FD into multiple ones with singleton right sides or to combine multiple singleton right side FDs into one FD. There is no splitting /combining rule for left sides. We’ll generally express FDs with singleton right sides .
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 231 Functional Dependency Consider the relation Movies1 (title, year, length, genre, studioName, starName). title year length genre studioName holds, assuming that there are not two movies with the same title in the same year. title year starName does not hold, since a movie can have more than one star acting. A FD makes an assertion about all possible instances of a relation, not only about one (such as the current) instance. CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 232 Keys Given a relation R with attributes X = {A 1 , . . ., A n }. is a

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/07/2009 for the course CS 12601 taught by Professor Kewang during the Spring '09 term at Simon Fraser.

### Page1 / 12

354.DesignTheory - Database Systems I Design Theory for...

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

View Full Document
Ask a homework question - tutors are online