1 CSC 1035 Supplement for Chapter 2 Functional Dependencies.

Slides:



Advertisements
Similar presentations
Schema Refinement: Normal Forms
Advertisements

primary key constraint foreign key constraint
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
Announcements Read 5.1 – 5.5 for today Read 5.6 – 5.7 for Wednesday Project Step 3, due Monday 10/18 Homework, due Friday 10/15 – by Research paper,
NORMALIZATION. Normalization Normalization: The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into smaller relations.
Ch 10, Functional Dependencies and Normal forms
Functional Dependencies, Normalization Rose-Hulman Institute of Technology Curt Clifton.
Copyright © 2004 Pearson Education, Inc.. Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Jump to first page Normalization Jump to first page Topics n Why normalization is needed n What causes anomalies n What the 4 normal forms are n How.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
MVDs: 1 Join Dependencies—Example Let r = A B C = A B |  | A C 1 a x 1 a 1 x 1 a y 1 b 1 y 1 b x 2 a 2 y 1 b y 2 b 2 a y 2 b y Observe: r =  AB r | 
Establishing Table Structures Chapter 7 Database Design for Mere Mortals.
1 Triggers: Correction. 2 Mutating Tables (Explanation) The problems with mutating tables are mainly with FOR EACH ROW triggers STATEMENT triggers can.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Department of Computer Science and Engineering, HKUST Slide 1 Finding All the Keys Computationally, finding all the keys can be done by exhaustive search:
Chapter 8 Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Normalization Quiz Tao Li Grant Horntvedt. 1. Which of the following statements is true: a. Normal forms can be derived by inspecting the data in various.
1 Announcements Read 6.7 – 6.10 for Friday Homework 6, due Friday 10/29 Research paper –List of sources - due 10/29 Department Seminar –The Role of Experimentation.
CSC271 Database Systems Lecture # 21. Summary: Previous Lecture  Phases of database SDLC  Prototyping (optional)  Implementation  Data conversion.
Databases Illuminated
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Chapter 13 Further Normalization II: Higher Normal Forms.
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
Announcements Read 5.8 – 5.13 for Monday Project Step 3, due Monday 10/18 Homework 4, due Friday 10/15 – by (or turn in Monday in class)
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
Chapter 7 Normalization. Outline Modification anomalies Functional dependencies Major normal forms Relationship independence Practical concerns.
Objectives of Normalization Develop a good description of the data, its relationships and constraints Produce a stable set of relations that Is a faithful.
Your name here. Improving Schemas and Normalization What are redundancies and anomalies? What are functional dependencies and how are they related to.
Chapter 7 Normalization. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Modification anomalies Functional dependencies.
Schema Refinement and Normal Forms 20131CS3754 Class Notes #7, John Shieh.
CSC271 Database Systems Lecture # 28.
Functional Dependencies and Normalization for Relational Databases.
Normalization Ioan Despi 2 The basic objective of logical modeling: to develop a “good” description of the data, its relationships and its constraints.
Functional Dependencies and Normalization Jose M. Peña
Databases MIS 21. Some database terminology  Database: integrated collection of data  Database Management System (DBMS): environment that provides mechanisms.
Group 6. What is data redundancy? Data redundancy occurs in database systems which have a field that is repeated in two or more tables... Data redundancy.
1 Lecture 6: Schema refinement: Functional dependencies
Lecture No 14 Functional Dependencies & Normalization ( III ) Mar 04 th 2011 Database Systems.
Functional Dependencies. FarkasCSCE 5202 Reading and Exercises Database Systems- The Complete Book: Chapter 3.1, 3.2, 3.3., 3.4 Following lecture slides.
1 Functional Dependencies and Normalization Chapter 15.
ABSTRACT OF FIRST LECTURE then … the second lesson.
IST 210 Normalization 2 Todd Bacastow IST 210. Normalization Methods Inspection Closure Functional dependencies are key.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Announcements Reading for Monday –4.6 Homework 3 – Due 9/29.
1 CSE 480: Database Systems Lecture 18: Normal Forms and Normalization.
Databases Illuminated Chapter 6 Normalization. Objectives of Normalization Develop a good description of the data, its relationships and constraints Produce.
Databases Illuminated
November 9, Query: “Find the schedules and rooms of all courses taken by any Math major.” Symbolically:  schedule, room (  major=‘Math’ ((Student.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
Ch 7: Normalization-Part 1
CS542 1 Schema Refinement Chapter 19 (part 1) Functional Dependencies.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 5 Introduction to a First Course in Database Systems.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke1 Schema Refinement and Normal Forms Chapter 19.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
Al-Imam University Girls Education Center Collage of Computer Science 1 st Semester, 1432/1433H Chapter 10_part 1 Functional Dependencies and Normalization.
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.
Southern Methodist University CSE CSE 2337 Introduction to Data Management Chapter 5 Part II.
Al-Imam University Girls Education Center Collage of Computer Science 1 nd Semester, 1432/1433H Chapter 10_part2 Functional Dependencies and Normalization.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Functional Dependencies and Normalization for Relational Databases تنبيه : شرائح العرض (Slides) هي وسيلة لتوضيح الدرس واداة من الادوات في ذلك. حيث المرجع.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
4NF & MULTIVALUED DEPENDENCY By Kristina Miguel. Review  Superkey – a set of attributes which will uniquely identify each tuple in a relation  Candidate.
COP 6726: New Directions in Database Systems
Announcements Read 5.1 – 5.5 for today Read 5.6 – 5.7 for Wednesday
Chapter 14 Normalization.
3.1 Normalization of Relations (1)
Presentation transcript:

1 CSC 1035 Supplement for Chapter 2 Functional Dependencies

2 Definition and Notation Suppose X and Y are sets of attributes (column names) Check whether this statement is true or not: “For every set of values in the X columns, there can be at most one set of values in the Y columns” If that’s true, then say X determines Y And write X -> Y

3 An example of some FD’s Suppose the attribute names are: stuId, firstName, lastName, major, credits, classNumber, grade, schedule, room, facId, name, rank, department And suppose the semantics are the same as in University.mdb On the next pages, let’s analyze those attributes for FD’s.

4 Examples from University.mdb This statement is true: “For every set of values of stuId, classNumber, there can be at most one grade.” So is this one: “For every value of stuId, there can be at most one value of firstName and lastName. This one isn’t true: “For every value of classNumber, there can be at most one value of stuId.”

5 Examples, continued Phrasing the examples from the previous slide in technical database language: –stuId, classNumber -> grade –stuID -> firstName, lastName –classNumber does NOT determine stuId

6 Here’s a complete list of FD’s stuId -> firstName, lastName, major, credits stuId, classNumber -> grade classNumber -> room, schedule, facId facId -> name, rank, department

7 Setting up the tables in the database Each of the FD’s in the last slide should lead to its own table. Within each table, the left-hand part of the FD becomes the primary key. So rather than a single table with all 13 attributes, we get four tables, each with fewer attributes. The big table would have had redundancies.

8 Normalization The process of decomposing a big table into smaller ones, in order to avoid redundancies and anomalies, is called normalization. An indication of a table that’s not normalized would be if you can spot a FD X->Y where X isn’t a key for that table.