Jennifer Widom Relational Design Theory Motivation & overview.

Slides:



Advertisements
Similar presentations
Normalization Dr. Mario Guimaraes. Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints.
Advertisements

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.
Copyright © 2004 Pearson Education, Inc.. Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
Chapter 8 Normal Forms Based on Functional Dependencies Deborah Costa Oct 18, 2007.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
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:
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
Functional Dependency Rajhdeep Jandir. Definition A functional dependency is defined as a constraint between two sets of attributes in a relation from.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization.
Normalization of Database Tables
1 Functional Dependency and Normalization Informal design guidelines for relation schemas. Functional dependencies. Normal forms. Normalization.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Introduction to Schema Refinement
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Functional Dependencies
Lecture 12 Inst: Haya Sammaneh
Normalization Goal = BCNF = Boyce-Codd Normal Form = all FD’s follow from the fact “key  everything.” Formally, R is in BCNF if for every nontrivial FD.
Bordoloi Database Design: Normalization Dr. Bijoy Bordoloi.
Concepts of Database Management, Fifth Edition
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
Database Normalization.
Further Normalization II: Higher Normal Forms Prof. Yin-Fu Huang CSIE, NYUST Chapter 13.
Data Normalization Normal is not something to aspire to, it's something to get away from. ~ Jodie Foster ~
Jennifer Widom Relational Design Theory Boyce-Codd Normal Form.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
CS143 Review: Normalization Theory Q: Is it a good table design? We can start with an ER diagram or with a large relation that contain a sample of the.
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.
1 Normalization, Roberts’s Rules and Introduction to Data Modeling CSCI 6442.
Functional Dependencies and Normalization for Relational Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
CSE314 Database Systems Basics of Functional Dependencies and Normalization for Relational Databases Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
Revisit FDs & BCNF Normalization 1 Instructor: Mohamed Eltabakh
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
Announcements Program 3 due Friday Homework 2 out today, due Mon Read: Chapter 3.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
Jennifer Widom Relational Design Theory Shortcomings of BCNF/4NF.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Database design and normalization.
Ch 7: Normalization-Part 1
Jennifer Widom Relational Design Theory Functional Dependencies.
CS411 Database Systems Kazuhiro Minami 04: Relational Schema Design.
Dr. T. Y. Lin | SJSU | CS 157A | Fall 2015 Chapter 3 Database Normalization 1.
Copyright © Curt Hill Schema Refinement II 2 nd NF to 3 rd NF to BCNF.
Decomposition and Normalization Fan Qi
Logical Database Design and Relational Data Model Muhammad Nasir
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute.
Chapter 7: Relational Database Design. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts.
Database Normalization. What is Normalization Normalization allows us to organize data so that it: Normalization allows us to organize data so that it:
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
COP 6726: New Directions in Database Systems
Problems in Designing Schema
11/12/2018.
Relational Design Theory
Relational Design Theory
Relational Design Theory
Relational Design Theory
Relational Design Theory
Lecture #17: Schema Refinement & Normalization - Normal Forms
Functional Dependencies and Normalization
Relational Design Theory
Relational Design Theory
Presentation transcript:

Jennifer Widom Relational Design Theory Motivation & overview

Jennifer Widom Rel. design - overview Designing a database schema  Usually many designs possible  Some are (much) better than others!  How do we choose? Often use higher-level design tools, but …  Some designers go straight to relations  Useful to understand why tools produce certain schemas  Very nice theory for relational database design

Jennifer Widom Rel. design - overview Example: College application info.  SSN and name  Colleges applying to  High schools attended (with city)  Hobbies Apply(SSN, sName, cName, HS, HScity, hobby)

Jennifer Widom Rel. design - overview Apply(SSN, sName, cName, HS, HScity, hobby) 123 Ann from PAHS (P.A.) and GHS (P.A.) plays tennis and trumpet and applied to Stanford, Berkeley, and MIT

Jennifer Widom Rel. design - overview Apply(SSN, sName, cName, HS, HScity, hobby) 123 Ann from PAHS (P.A.) and GHS (P.A.) plays tennis and trumpet and applied to Stanford, Berkeley, and MIT Design “anomalies”  Redundancy

Jennifer Widom Rel. design - overview Apply(SSN, sName, cName, HS, HScity, hobby) 123 Ann from PAHS (P.A.) and GHS (P.A.) plays tennis and trumpet and applied to Stanford, Berkeley, and MIT Design “anomalies”  Redundancy  Update anomaly

Jennifer Widom Rel. design - overview Apply(SSN, sName, cName, HS, HScity, hobby) 123 Ann from PAHS (P.A.) and GHS (P.A.) plays tennis and trumpet and applied to Stanford, Berkeley, and MIT Design “anomalies”  Redundancy  Update anomaly  Deletion anomaly

Jennifer Widom Rel. design - overview Example: College application info.  SSN and name  Colleges applying to  High schools attended (with city)  Hobbies Student(SSN, sName) Apply(SSN, cName) HighSchool(SSN, HS) Located(HS, HScity) Hobbies(SSN, hobby)

Jennifer Widom Rel. design - overview Design by decomposition  Start with “mega” relations containing everything  Decompose into smaller, better relations with same info.  Can do decomposition automatically Automatic decomposition  “Mega” relations + properties of the data  System decomposes based on properties  Final set of relations satisfies normal form – No anomalies, no lost information

Jennifer Widom Rel. design - overview Properties and Normal Forms Functional dependencies  Boyce-Codd Normal Form + Multivalued dependences  Fourth Normal Form

Jennifer Widom Rel. design - overview Functional Dependencies and BCNF Apply(SSN, sName, cName)  Redundancy; Update & Deletion Anomalies  Storing SSN-sName pair once for each college Functional Dependency SSN  sName  Same SSN always has same sName  Should store each SSN ’s sName only once Boyce-Codd Normal Form If A  B then A is a key Decompose: Student(SSN, sName) Apply(SSN, cName)

Jennifer Widom Rel. design - overview Multivalued Dependencies and 4NF Apply(SSN, cName, HS)  Redundancy; Update & Deletion Anomalies  Multiplicative effect  Not addressed by BCNF: No functional dependencies Multivalued Dependency SSN cName  Given SSN has every combination of cName with HS  Should store each cName and each HS for an SSN once Fourth Normal Form If A B then A is a key Decompose: Apply(SSN, cName) HighSchool(SSN, HS)

Jennifer Widom Rel. design - overview 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