Jennifer Widom Relational Design Theory Functional Dependencies.

Slides:



Advertisements
Similar presentations
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Relational Database Design Algorithms and Further Dependencies.
Advertisements

Manipulating Functional Dependencies Zaki Malik September 30, 2008.
Spring 2011 Instructor: Hassan Khosravi
METU Department of Computer Eng Ceng 302 Introduction to DBMS Further Dependencies by Pinar Senkul resources: mostly froom Elmasri, Navathe and other books.
Chapter 3 Notes. 3.1 Functional Dependencies A functional dependency is a statement that – two tuples of a relation that agree on some particular set.
Database Management COP4540, SCS, FIU Functional Dependencies (Chapter 14)
+ Review: Normalization and data anomalies CSCI 2141 W2013 Slide set modified from courses.ischool.berkeley.edu/i257/f06/.../Lecture06_257.ppt.
Relational Normalization Theory. Limitations of E-R Designs Provides a set of guidelines, does not result in a unique database schema Does not provide.
Functional Dependencies and Normalization for Relational Databases.
Jennifer Widom Relational Design Theory Motivation & overview.
Murali Mani Normalization. Murali Mani What and Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert,
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 227 Database Systems I Design Theory for Relational Databases.
The Relational Model System Development Life Cycle Normalisation
Design Guidelines Normalisation Table Design. Informal Design Guidelines Table Semantics A table should hold information about one and only one entity/concept.
Functional Dependencies Definition: If two tuples agree on the attributes A, A, … A 12n then they must also agree on the attributes B, B, … B 12m Formally:
Nov 11, 2003Murali Mani Normalization B term 2004: lecture 7, 8, 9.
Functional Dependency Rajhdeep Jandir. Definition A functional dependency is defined as a constraint between two sets of attributes in a relation from.
Functional Dependencies (Part 3) Presented by Nash Raghavan All page numbers are in reference to Database System Concepts (5 th Edition)
Cs3431 Normalization. cs3431 Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert, delete and update.
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
1 Schema Refinement and Normal Forms Chapter 19 Raghu Ramakrishnan and J. Gehrke (second text book) In Course Pick-up box tomorrow.
CMSC424: Database Design Instructor: Amol Deshpande
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Functional Dependencies and Relational Schema Design.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design.
CS 405G: Introduction to Database Systems 16. Functional Dependency.
Functional Dependencies and Normalization 1 Instructor: Mohamed Eltabakh
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
DatabaseIM ISU1 Chapter 10 Functional Dependencies and Normalization for RDBs Fundamentals of Database Systems.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Jennifer Widom Relational Design Theory Boyce-Codd Normal Form.
SCUJ. Holliday - coen 1784–1 Schedule Today: u Normal Forms. u Section 3.6. Next u Relational Algebra. Read chapter 5 to page 199 After that u SQL Queries.
FEN Quality checking table design: Design Guidelines Normalisation Table Design Is this OK?
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 11 Relational Database Design Algorithms and Further Dependencies.
1 Lecture 6: Schema refinement: Functional dependencies
Revisit FDs & BCNF Normalization 1 Instructor: Mohamed Eltabakh
Functional Dependencies. FarkasCSCE 5202 Reading and Exercises Database Systems- The Complete Book: Chapter 3.1, 3.2, 3.3., 3.4 Following lecture slides.
© D. Wong Ch. 3 (continued)  Database design problems  Functional Dependency  Keys of relations  Decompositions based on Functional Dependency.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Functional Dependencies CIS 4301 Lecture Notes Lecture 8 - 2/7/2006.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Multivalued Dependencies and 4th NF CIS 4301 Lecture Notes Lecture /21/2006.
Jennifer Widom Relational Design Theory Shortcomings of BCNF/4NF.
CS542 1 Schema Refinement Chapter 19 (part 1) Functional Dependencies.
CS411 Database Systems Kazuhiro Minami 04: Relational Schema Design.
© D. Wong Functional Dependencies (FD)  Given: relation schema R(A1, …, An), and X and Y be subsets of (A1, … An). FD : X  Y means X functionally.
Final Review Zaki Malik November 20, Basic Operators Covered.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
11/06/97J-1 Principles of Relational Design Chapter 12.
1 CS 430 Database Theory Winter 2005 Lecture 8: Functional Dependencies Second, Third, and Boyce-Codd Normal Forms.
Logical Database Design and Relational Data Model Muhammad Nasir
Functional Dependencies and Normalization for Relational Databases 1 Chapter 15 تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة من الادوات في.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
Functional Dependencies and Normalization 1 Instructor: Mohamed Eltabakh Part 2.
Advanced Normalization
Advanced Normalization
Relational Design Theory
Relational Design Theory
Relational Design Theory
Relational Design Theory
Relational Design Theory
Normalization Murali Mani.
Functional Dependencies and Normalization
Mulitvalued Dependencies
Relational Design Theory
Relational Design Theory
Normalization cs3431.
Terminology Product Attribute names Name Price Category Manufacturer
Presentation transcript:

Jennifer Widom Relational Design Theory Functional Dependencies

Jennifer Widom Relational design by decomposition  “Mega” relations + properties of the data  System decomposes based on properties  Final set of relations satisfies normal form – No anomalies, no lost information  Functional dependencies  Boyce-Codd Normal Form  Multivalued dependences  Fourth Normal Form Functional dependencies are generally useful concept  Data storage – compression  Reasoning about queries – optimization Functional Dependencies

Jennifer Widom Example: College application info. Student(SSN, sName, address, HScode, HSname, HScity, GPA, priority) Apply(SSN, cName, state, date, major) Functional Dependencies

Jennifer Widom Student(SSN, sName, address, HScode, HSname, HScity, GPA, priority) Suppose priority is determined by GPA Two tuples with same GPA have same priority Functional Dependencies

Jennifer Widom Student(SSN, sName, address, HScode, HSname, HScity, GPA, priority) Two tuples with same GPA have same priority Functional Dependencies

Jennifer Widom Functional Dependency  Based on knowledge of real world  All instances of relation must adhere Functional Dependencies

Jennifer Widom Student(SSN, sName, address, HScode, HSname, HScity, GPA, priority) Functional Dependencies

Jennifer Widom Apply(SSN, cName, state, date, major) Functional Dependencies

Jennifer Widom Functional Dependencies and Keys  Relation with no duplicates  Suppose Ᾱ  all attributes Functional Dependencies

Jennifer Widom Trivial Functional Dependency Nontrivial FD Completely nontrivial FD Functional Dependencies

Jennifer Widom Rules for Functional Dependencies Splitting rule Can we also split left-hand-side? Functional Dependencies

Jennifer Widom Rules for Functional Dependencies Combining rule Functional Dependencies

Jennifer Widom Rules for Functional Dependencies Trivial-dependency rules Functional Dependencies

Jennifer Widom Rules for Functional Dependencies Transitive rule Functional Dependencies

Jennifer Widom Closure of Attributes  Given relation, FDs, set of attributes Ᾱ  Find all B such that Ᾱ  B Functional Dependencies

Jennifer Widom Closure Example Student(SSN, sName, address, HScode, HSname, HScity, GPA, priority) SSN  sName, address, GPA GPA  priority HScode  HSname, HScity Functional Dependencies

Jennifer Widom Closure and Keys Is Ᾱ a key for R ? How can we find all keys given a set of FDs? Functional Dependencies

Jennifer Widom Specifying FDs for a relation  S 1 and S 2 sets of FDs  S 2 “follows from” S 1 if every relation instance satisfying S 1 also satisfies S 2 How to test? Does A  B follow from S ? Functional Dependencies

Jennifer Widom Specifying FDs for a relation Want: Minimal set of completely nontrivial FDs such that all FDs that hold on the relation follow from the dependencies in this set Functional Dependencies

Jennifer Widom Functional dependencies are generally useful concept  Relational design by decomposition Functional dependencies  Boyce-Codd Normal Form  Data storage – compression  Reasoning about queries – optimization Functional Dependencies