Databases Tutorial. March,15,2012 Jing Chen Mcmaster University

Size: px
Start display at page:

Download "Databases Tutorial. March,15,2012 Jing Chen Mcmaster University"

Transcription

1 Databases Tutorial March,15,2012 Jing Chen Mcmaster University

2 Outline 1NF Functional Dependencies BCNF 3NF

3 Larger Schema Suppose we combine borrower and loan to get bor_loan - borrower = (customer_id, loan_number) - loan = (loan_number, amount) - bor_loan = (customer_id, loan_number, amount )

4 Larger Schema (Cont.) Redundancy! Inconsistency!

5 Larger Schema (Cont.) Suppose we combine loan and loan_branch to get loan_amt_br - loan = (loan_number, amount) - Loan_branch = (loan_number, branch_name) - Loan_amt_br = (loan_number, amount, branch_name )

6 Larger Schema (Cont.) Null values!

7 Smaller Schema Suppose we split up employee into employee1 and employee2 - employee = (id, name, telephone_number, start_date) - employee1 = (id, name) - employee2 = (name, telephone_number, start_date)

8 Lossy Decomposition

9 First Normal Form (1NF) Domain is atomic if its elements are considered to be indivisible units A relational schema R is in first normal form if the domains of all attributes of R are atomic Exmaple - Identification numbers like CS101 that can be broken up into parts

10 Functional Dependencies Let R be a relation schema α R and β R The functional dependency α β holds on R if and only if for any legal relations r(r), whenever any two tuples t 1 and t 2 of r agree on the attributes α, they also agree on the attributes β. That is, t 1 [α] = t 2 [α] t 1 [β ] = t 2 [β ] A functional dependency α β is trivial if β α

11 Functional Dependencies (Cont.) Example R(A,B,C,D), PK=(A,B) Functional dependency α β t1 A a1 B b1 C c1 D d1 (1) α R and β R (2) t1[α] = t2 [α] t1[β ] = t2 [β ] t2 t3 t4 t5 a1 a2 a2 a3 b2 b2 b3 b3 c1 c2 c2 c2 d2 d2 d3 d4 A C does hold C A does NOT hold A,B A is trivial B A is NOT trivial

12 Boyce-Codd Normal Form (BCNF) R is in BCNF if for any A B one of the following holds -it is a trivial dependency (B is a subset of A) -A is a superkey for R

13 BCNF (Cont.) Example Consider a relation Winner (Tournament, Year, Name, Province), you know the following facts: the only candidate key is (Tournament, Year) and except the key, there is only one other functional dependency Name Province. (For instance, the tournaments are held once a year, Province is the birth province of the winner, and from each province only a single representative is allowed.) (1) Give a definition of BCNF Answer: A relation R is in BCNF if for any functional dependency α β, either - α β is trivial or - α is a superkey of R

14 BCNF (Cont.) Example Consider a relation Winner (Tournament, Year, Name, Province), you know the following facts: the only candidate key is (Tournament, Year) and except the key, there is only one other functional dependency Name Province. (For instance, the tournaments are held once a year, Province is the birth province of the winner, and from each province only a single representative is allowed.) (2) Show relation Winner is not in BCNF Answer: Consider the dependency Name Province, it is not trivial. {Name} is not a superkey. Thus, this dependency violates BCNF.

15 BCNF (Cont.) Example Consider a relation Winner (Tournament, Year, Name, Province), you know the following facts: the only candidate key is (Tournament, Year) and except the key, there is only one other functional dependency Name Province. (For instance, the tournaments are held once a year, Province is the birth province of the winner, and from each province only a single representative is allowed.) (3) Decompose (losslessly) relation Winner into relations that are in BCNF Answer: Tournament (Tournament, Year, Name), where PK=(Tournament, Year) and Player (Name, Province), where PK=(Name), These tables are in BCNF and it is a lossless decomposition

16 BCNF (Cont.) Decompose a schema into BCNF Suppose we have a schema R and a nontrivial dependency α β causes a violation of BCNF. We decompose R into: - (α U β ) - ( R - ( β - α ) )

17 Third Normal Form (3NF) R is in 3NF if for any A B one of the following holds - it is a trivial dependency (B is a subset of A) - A is a superkey for R - every attribute t from B-A is a part of a candidate key

18 3NF (Cont.) Example Consider a relation SALES (CustomerID, CustomerName, Salesperson, Region) (1) fact: the only candidate key is CustomerID (2) fact: Salesperson Region Answer: the dependency Salesperson Region violates 3NF Decomposition: SALES(CustomerID,CustomerName,Salesperson) PK=CustomerID SALESPERSON(Salesperson, Region) PK=Saleperson these tables are in 3NF and it is a lossless decomposition.

19 Reference Databases system concepts, fifth edition, Authored by Abraham Silberschatz, Henry F.Korth, S.Sudarshan Slides of Chapter 7: Relational Databases Design,Databases system concepts, fifth edition, Authored by Abraham Silberschatz, Henry F.Korth, S.Sudarshan Databases course website > Help > 3NF exercises, Copyright preserved by Dr. Frantisek (Franya) FRANEK Midterm 2 of 2010, Copyright preserved by Dr. Frantisek (Franya) FRANEK

Chapter 7: Relational Database Design

Chapter 7: Relational Database Design Chapter 7: Relational Database Design Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 7: Relational Database Design Features of Good Relational Design Atomic Domains

More information

Functional Dependencies

Functional Dependencies Functional Dependencies Redundancy in Database Design A table Students-take-courses (stud-id, name, address, phone, crs-id, instructor-name, office) Students(stud-id, name, address, phone, ) Instructors(name,

More information

Chapter 6: Relational Database Design

Chapter 6: Relational Database Design Chapter 6: Relational Database Design Chapter 6: Relational Database Design Features of Good Relational Design Atomic Domains and First Normal Form Decomposition Using Functional Dependencies Second Normal

More information

Lecture 11 - Chapter 8 Relational Database Design Part 1

Lecture 11 - Chapter 8 Relational Database Design Part 1 CMSC 461, Database Management Systems Spring 2018 Lecture 11 - Chapter 8 Relational Database Design Part 1 These slides are based on Database System Concepts 6th edition book and are a modified version

More information

customer = (customer_id, _ customer_name, customer_street,

customer = (customer_id, _ customer_name, customer_street, Relational Database Design COMPILED BY: RITURAJ JAIN The Banking Schema branch = (branch_name, branch_city, assets) customer = (customer_id, _ customer_name, customer_street, customer_city) account = (account_number,

More information

Lecture 14 of 42. E-R Diagrams, UML Notes: PS3 Notes, E-R Design. Thursday, 15 Feb 2007

Lecture 14 of 42. E-R Diagrams, UML Notes: PS3 Notes, E-R Design. Thursday, 15 Feb 2007 Lecture 14 of 42 E-R Diagrams, UML Notes: PS3 Notes, E-R Design Thursday, 15 February 2007 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course page: http://snipurl.com/va60

More information

NORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18

NORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18 NORMAL FORMS CS121: Relational Databases Fall 2017 Lecture 18 Equivalent Schemas 2 Many different schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation

More information

Normal Forms. Winter Lecture 19

Normal Forms. Winter Lecture 19 Normal Forms Winter 2006-2007 Lecture 19 Equivalent Schemas Many schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation must be complete Data should

More information

Functional dependency theory

Functional dependency theory Functional dependency theory Introduction to Database Design 2012, Lecture 8 Course evaluation Recalling normal forms Functional dependency theory Computing closures of attribute sets BCNF decomposition

More information

Normalisation theory

Normalisation theory Normalisation theory Introduction to Database Design 2012, Lecture 7 Challenging exercises E-R diagrams example Normalisation theory, motivation Functional dependencies Boyce-Codd normal form (BCNF) 3rd

More information

UNIT -III. Two Marks. The main goal of normalization is to reduce redundant data. Normalization is based on functional dependencies.

UNIT -III. Two Marks. The main goal of normalization is to reduce redundant data. Normalization is based on functional dependencies. UNIT -III Relational Database Design: Features of Good Relational Designs- Atomic Domains and First Normal Form- Second Normal Form-Decomposition Using Functional Dependencies- Functional-Dependency Theory-Algorithms

More information

Databases Tutorial. January 19,2012 Jing Chen Mcmaster University

Databases Tutorial. January 19,2012 Jing Chen Mcmaster University Databases Tutorial January 19,2012 Jing Chen Mcmaster University Info Office: ITB 229 Email: chenj45@univmail.cis.mcmaster.ca Homepage: http://www.cas.mcmaster.ca/~chenj45 Outline (to be continued ) Review

More information

Combining schemas. Problems: redundancy, hard to update, possible NULLs

Combining schemas. Problems: redundancy, hard to update, possible NULLs Handout Combining schemas Problems: redundancy, hard to update, possible NULLs Problems? Conclusion: Whether the join attribute is PK or not makes a great difference when combining schemas! Splitting schemas,

More information

Chapter 8: Relational Database Design

Chapter 8: Relational Database Design Chapter 8: Relational Database Design Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 8: Relational Database Design Features of Good Relational Design Atomic Domains

More information

Relational Database Design (II)

Relational Database Design (II) Relational Database Design (II) 1 Roadmap of This Lecture Algorithms for Functional Dependencies (cont d) Decomposition Using Multi-valued Dependencies More Normal Form Database-Design Process Modeling

More information

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design 1 Normalization What and Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert, delete and update Normalization uses concept of dependencies Functional

More information

Unit 3 : Relational Database Design

Unit 3 : Relational Database Design Unit 3 : Relational Database Design Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Content Relational Model: Basic concepts, Attributes and Domains, CODD's Rules, Relational

More information

CSIT5300: Advanced Database Systems

CSIT5300: Advanced Database Systems CSIT5300: Advanced Database Systems L06: Relational Database Design BCNF Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science and Technology Hong Kong SAR,

More information

Redundancy:Dependencies between attributes within a relation cause redundancy.

Redundancy:Dependencies between attributes within a relation cause redundancy. Normalization Normalization: It is the process of removing redundant data from your tables in order to improve storage efficiency, data integrity and scalability. This improvement is balanced against an

More information

UNIT 3 DATABASE DESIGN

UNIT 3 DATABASE DESIGN UNIT 3 DATABASE DESIGN Objective To study design guidelines for relational databases. To know about Functional dependencies. To have an understanding on First, Second, Third Normal forms To study about

More information

CSE 562 Database Systems

CSE 562 Database Systems Goal CSE 562 Database Systems Question: The relational model is great, but how do I go about designing my database schema? Database Design Some slides are based or modified from originals by Magdalena

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 14 Basics of Functional Dependencies and Normalization for Relational Databases Slide 14-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1 Semantics of the Relation Attributes

More information

More Normalization Algorithms. CS157A Chris Pollett Nov. 28, 2005.

More Normalization Algorithms. CS157A Chris Pollett Nov. 28, 2005. More Normalization Algorithms CS157A Chris Pollett Nov. 28, 2005. Outline 3NF Decomposition Algorithms BCNF Algorithms Multivalued Dependencies and 4NF Dependency-Preserving Decomposition into 3NF Input:

More information

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002 Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002 NAME (Printed) NAME (Signed) E-mail Exam Rules Show all your work. Your grade will be based on the work

More information

Design Theory for Relational Databases

Design Theory for Relational Databases By Marina Barsky Design Theory for Relational Databases Lecture 15 Functional dependencies: formal definition X Y is an assertion about a relation R that whenever two tuples of R agree on all the attributes

More information

Functional Dependencies CS 1270

Functional Dependencies CS 1270 Functional Dependencies CS 1270 Constraints We use constraints to enforce semantic requirements on a DBMS Predicates that the DBMS must ensure to be always true. Predicates are checked when the DBMS chooses

More information

QUESTION BANK. SUBJECT CODE / Name: CS2255 DATABASE MANAGEMENT SYSTEM UNIT III. PART -A (2 Marks)

QUESTION BANK. SUBJECT CODE / Name: CS2255 DATABASE MANAGEMENT SYSTEM UNIT III. PART -A (2 Marks) QUESTION BANK DEPARTMENT: CSE SEMESTER: IV SUBJECT CODE / Name: CS2255 DATABASE MANAGEMENT SYSTEM UNIT III PART -A (2 Marks) 1. Explain the two conditions needed for the set difference operation (union

More information

Chapter 16. Relational Database Design Algorithms. Database Design Approaches. Top-Down Design

Chapter 16. Relational Database Design Algorithms. Database Design Approaches. Top-Down Design Chapter 16 Relational Database Design Algorithms Database Design Approaches Top-Down design (Starting with conceptual design) Bottom-Up Design (relational synthesis) 2 Top-Down Design Design conceptual

More information

Review: Attribute closure

Review: Attribute closure CS445 - Introduction to Database Management Systems Fall Semester 2015 LECTURE 10 Functional Dependencies, Normalization Part II TEXTBOOK REFERENCE: CHAPTER 19 CS445 DATABASES: LECTURE 10 1 Review: Attribute

More information

Lectures 12: Design Theory I. 1. Normal forms & functional dependencies 2/19/2018. Today s Lecture. What you will learn about in this section

Lectures 12: Design Theory I. 1. Normal forms & functional dependencies 2/19/2018. Today s Lecture. What you will learn about in this section Today s Lecture Lectures 12: Design Theory I Professor Xiannong Meng Spring 2018 Lecture and activity contents are based on what Prof Chris Ré used in his CS 145 in the fall 2016 term with permission 1.

More information

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization CSE 544 Principles of Database Management Systems Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to this

More information

The Relational Model and Normalization

The Relational Model and Normalization The Relational Model and Normalization 1. Introduction 2 2. Relational Model Terminology 3 4. Normal Forms 11 5. Multi-valued Dependency 21 6. The Fifth Normal Form 22 The Relational Model and Normalization

More information

Chapter 14 Outline. Normalization for Relational Databases: Outline. Chapter 14: Basics of Functional Dependencies and

Chapter 14 Outline. Normalization for Relational Databases: Outline. Chapter 14: Basics of Functional Dependencies and Ramez Elmasri, Shamkant B. Navathe(2016) Fundamentals of Database Systems (7th Edition), pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7. Chapter 14: Basics of Functional Dependencies and Normalization

More information

Schema Refinement: Dependencies and Normal Forms

Schema Refinement: Dependencies and Normal Forms Schema Refinement: Dependencies and Normal Forms Grant Weddell David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2012 CS 348 (Intro to

More information

Chapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)

Chapter 10. Normalization. Chapter Outline. Chapter Outline(contd.) Chapter 10 Normalization Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null

More information

Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 19 Relational Database Design (Contd.) Welcome to module

More information

Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See   for conditions on re-use Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Structure of Relational Databases! Fundamental Relational-Algebra-Operations! Additional

More information

Databases Lecture 7. Timothy G. Griffin. Computer Laboratory University of Cambridge, UK. Databases, Lent 2009

Databases Lecture 7. Timothy G. Griffin. Computer Laboratory University of Cambridge, UK. Databases, Lent 2009 Databases Lecture 7 Timothy G. Griffin Computer Laboratory University of Cambridge, UK Databases, Lent 2009 T. Griffin (cl.cam.ac.uk) Databases Lecture 7 DB 2009 1 / 17 Lecture 07: Decomposition to Normal

More information

Fundamentals of Database Systems

Fundamentals of Database Systems Fundamentals of Database Systems Assignment: 3 Due Date: 23st August, 2017 Instructions This question paper contains 15 questions in 6 pages. Q1: Consider the following relation and its functional dependencies,

More information

Functional Dependencies and Normalization for Relational Databases Design & Analysis of Database Systems

Functional Dependencies and Normalization for Relational Databases Design & Analysis of Database Systems Functional Dependencies and Normalization for Relational Databases 406.426 Design & Analysis of Database Systems Jonghun Park jonghun@snu.ac.kr Dept. of Industrial Engineering Seoul National University

More information

Part II: Using FD Theory to do Database Design

Part II: Using FD Theory to do Database Design Part II: Using FD Theory to do Database Design 32 Recall that poorly designed table? part manufacturer manaddress seller selleraddress price 1983 Hammers R Us 99 Pinecrest ABC 1229 Bloor W 5.59 8624 Lee

More information

FUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E)

FUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E) FUNCTIONAL DEPENDENCIES CHAPTER 15.1-15.2, 15.5 (6/E) CHAPTER 10.1-10.2, 10.5 (5/E) 4 LECTURE OUTLINE Design guidelines for relation schemas Functional dependencies Definition and interpretation Formal

More information

Schema Refinement: Dependencies and Normal Forms

Schema Refinement: Dependencies and Normal Forms Schema Refinement: Dependencies and Normal Forms Grant Weddell Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Spring 2016 CS 348 (Intro to DB Mgmt)

More information

Normalisation. Normalisation. Normalisation

Normalisation. Normalisation. Normalisation Normalisation Normalisation Main objective in developing a logical data model for relational database systems is to create an accurate and efficient representation of the data, its relationships, and constraints

More information

Chapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases

Chapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant

More information

Schema Refinement: Dependencies and Normal Forms

Schema Refinement: Dependencies and Normal Forms Schema Refinement: Dependencies and Normal Forms M. Tamer Özsu David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Fall 2012 CS 348 Schema Refinement

More information

DBMS Chapter Three IS304. Database Normalization-Comp.

DBMS Chapter Three IS304. Database Normalization-Comp. Database Normalization-Comp. Contents 4. Boyce Codd Normal Form (BCNF) 5. Fourth Normal Form (4NF) 6. Fifth Normal Form (5NF) 7. Sixth Normal Form (6NF) 1 4. Boyce Codd Normal Form (BCNF) In the first

More information

CS 338 Functional Dependencies

CS 338 Functional Dependencies CS 338 Functional Dependencies Bojana Bislimovska Winter 2016 Outline Design Guidelines for Relation Schemas Functional Dependency Set and Attribute Closure Schema Decomposition Boyce-Codd Normal Form

More information

The strategy for achieving a good design is to decompose a badly designed relation appropriately.

The strategy for achieving a good design is to decompose a badly designed relation appropriately. The strategy for achieving a good design is to decompose a badly designed relation appropriately. Functional Dependencies The single most important concept in relational schema design theory is that of

More information

CS411 Database Systems. 05: Relational Schema Design Ch , except and

CS411 Database Systems. 05: Relational Schema Design Ch , except and CS411 Database Systems 05: Relational Schema Design Ch. 3.1-3.5, except 3.4.2-3.4.3 and 3.5.3. 1 How does this fit in? ER Diagrams: Data Definition Translation to Relational Schema: Data Definition Relational

More information

Introduction to Database Design, fall 2011 IT University of Copenhagen. Normalization. Rasmus Pagh

Introduction to Database Design, fall 2011 IT University of Copenhagen. Normalization. Rasmus Pagh Introduction to Database Design, fall 2011 IT University of Copenhagen Normalization Rasmus Pagh Based on KBL sections 6.1-6.8 (except p. 203 207m), 6.9 (until Multivalued dependencies ), 6.11, and 6.12.

More information

CS352 Lecture - Conceptual Relational Database Design

CS352 Lecture - Conceptual Relational Database Design CS352 Lecture - Conceptual Relational Database Design Objectives: last revised September 16, 2004 1. To define the concepts functional dependency and multivalued dependency 2. To show how to find the closure

More information

Databases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24

Databases -Normalization I. (GF Royle, N Spadaccini ) Databases - Normalization I 1 / 24 Databases -Normalization I (GF Royle, N Spadaccini 2006-2010) Databases - Normalization I 1 / 24 This lecture This lecture introduces normal forms, decomposition and normalization. We will explore problems

More information

Relational Design: Characteristics of Well-designed DB

Relational Design: Characteristics of Well-designed DB 1. Minimal duplication Relational Design: Characteristics of Well-designed DB Consider table newfaculty (Result of F aculty T each Course) Id Lname Off Bldg Phone Salary Numb Dept Lvl MaxSz 20000 Cotts

More information

This lecture. Databases -Normalization I. Repeating Data. Redundancy. This lecture introduces normal forms, decomposition and normalization.

This lecture. Databases -Normalization I. Repeating Data. Redundancy. This lecture introduces normal forms, decomposition and normalization. This lecture Databases -Normalization I This lecture introduces normal forms, decomposition and normalization (GF Royle 2006-8, N Spadaccini 2008) Databases - Normalization I 1 / 23 (GF Royle 2006-8, N

More information

Informal Design Guidelines for Relational Databases

Informal Design Guidelines for Relational Databases Outline Informal Design Guidelines for Relational Databases Semantics of the Relation Attributes Redundant Information in Tuples and Update Anomalies Null Values in Tuples Spurious Tuples Functional Dependencies

More information

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant

More information

Normalization. CMSC 461 Michael Wilson

Normalization. CMSC 461 Michael Wilson Normalization CMSC 461 Michael Wilson Normalization clarification Normalization is simply a way of reducing anomalous database behavior It s not a required or programmatically necessary concept A database

More information

Functional Dependencies and Finding a Minimal Cover

Functional Dependencies and Finding a Minimal Cover Functional Dependencies and Finding a Minimal Cover Robert Soulé 1 Normalization An anomaly occurs in a database when you can update, insert, or delete data, and get undesired side-effects. These side

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Overview - detailed. Goal. Faloutsos & Pavlo CMU SCS /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Overview - detailed. Goal. Faloutsos & Pavlo CMU SCS /615 Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed

More information

Database design III. Quiz time! Using FDs to detect anomalies. Decomposition. Decomposition. Boyce-Codd Normal Form 11/4/16

Database design III. Quiz time! Using FDs to detect anomalies. Decomposition. Decomposition. Boyce-Codd Normal Form 11/4/16 Lecture 3 Quiz time! Database design III Functional dependencies cont. BCNF and 3NF What s wrong with this schema? {(, 2, Databases, Steven Van Acker ), (, 4, Databases, Rogardt Heldal )} Redundancy! Using

More information

Chapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies

Chapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Chapter 14 Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Copyright 2012 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines

More information

CMU SCS CMU SCS CMU SCS CMU SCS whole nothing but

CMU SCS CMU SCS CMU SCS CMU SCS whole nothing but Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed

More information

The Relational Data Model

The Relational Data Model The Relational Data Model Lecture 6 1 Outline Relational Data Model Functional Dependencies Logical Schema Design Reading Chapter 8 2 1 The Relational Data Model Data Modeling Relational Schema Physical

More information

Theory of Normal Forms Decomposition of Relations. Overview

Theory of Normal Forms Decomposition of Relations. Overview .. Winter 2008 CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar.. Overview Theory of Normal Forms Decomposition of Relations Functional Dependencies capture the attribute dependencies

More information

Steps in normalisation. Steps in normalisation 7/15/2014

Steps in normalisation. Steps in normalisation 7/15/2014 Introduction to normalisation Normalisation Normalisation = a formal process for deciding which attributes should be grouped together in a relation Normalisation is the process of decomposing relations

More information

CSCI 403: Databases 13 - Functional Dependencies and Normalization

CSCI 403: Databases 13 - Functional Dependencies and Normalization CSCI 403: Databases 13 - Functional Dependencies and Normalization Introduction The point of this lecture material is to discuss some objective measures of the goodness of a database schema. The method

More information

Functional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)

Functional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys) 1 / 13 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant d Information in Tuples and Update Anomalies 1.3 Null Values in Tuples 1.4 Spurious Tuples

More information

Final Review. Zaki Malik November 20, 2008

Final Review. Zaki Malik November 20, 2008 Final Review Zaki Malik November 20, 2008 Basic Operators Covered Renaming If two relations have the same attribute, disambiguate the attributes by prefixing the attribute with the name of the relation

More information

COSC Dr. Ramon Lawrence. Emp Relation

COSC Dr. Ramon Lawrence. Emp Relation COSC 304 Introduction to Database Systems Normalization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Normalization Normalization is a technique for producing relations

More information

A database can be modeled as: + a collection of entities, + a set of relationships among entities.

A database can be modeled as: + a collection of entities, + a set of relationships among entities. The Relational Model Lecture 2 The Entity-Relationship Model and its Translation to the Relational Model Entity-Relationship (ER) Model + Entity Sets + Relationship Sets + Database Design Issues + Mapping

More information

DATABASTEKNIK - 1DL116

DATABASTEKNIK - 1DL116 1 DATABASTEKNIK - 1DL116 Spring 2004 An introductury course on database systems http://user.it.uu.se/~udbl/dbt-vt2004/ Kjell Orsborn Uppsala Database Laboratory Department of Information Technology, Uppsala

More information

Functional Dependencies and Single Valued Normalization (Up to BCNF)

Functional Dependencies and Single Valued Normalization (Up to BCNF) Functional Dependencies and Single Valued Normalization (Up to BCNF) Harsh Srivastava 1, Jyotiraditya Tripathi 2, Dr. Preeti Tripathi 3 1 & 2 M.Tech. Student, Centre for Computer Sci. & Tech. Central University

More information

CS352 Lecture - Conceptual Relational Database Design

CS352 Lecture - Conceptual Relational Database Design CS352 Lecture - Conceptual Relational Database Design Objectives: last revised September 20, 2006 1. To define the concepts functional dependency and multivalued dependency 2. To show how to find the closure

More information

Relational Design 1 / 34

Relational Design 1 / 34 Relational Design 1 / 34 Relational Design Basic design approaches. What makes a good design better than a bad design? How do we tell we have a "good" design? How to we go about creating a good design?

More information

Schema Normalization. 30 th August Submitted By: Saurabh Singla Rahul Bhatnagar

Schema Normalization. 30 th August Submitted By: Saurabh Singla Rahul Bhatnagar Schema Normalization 30 th August 2011 Submitted By: Saurabh Singla 09010146 Rahul Bhatnagar 09010136 Normalization Consider the following ER diagram with some FD: Instructor iid A Student sid Department

More information

Functional Dependencies & Normalization for Relational DBs. Truong Tuan Anh CSE-HCMUT

Functional Dependencies & Normalization for Relational DBs. Truong Tuan Anh CSE-HCMUT Functional Dependencies & Normalization for Relational DBs Truong Tuan Anh CSE-HCMUT 1 2 Contents 1 Introduction 2 Functional dependencies (FDs) 3 Normalization 4 Relational database schema design algorithms

More information

Chapter 2: Relational Model

Chapter 2: Relational Model Chapter 2: Relational Model Database System Concepts, 5 th Ed. See www.db-book.com for conditions on re-use Chapter 2: Relational Model Structure of Relational Databases Fundamental Relational-Algebra-Operations

More information

Introduction to Databases, Fall 2003 IT University of Copenhagen. Lecture 4: Normalization. September 16, Lecturer: Rasmus Pagh

Introduction to Databases, Fall 2003 IT University of Copenhagen. Lecture 4: Normalization. September 16, Lecturer: Rasmus Pagh Introduction to Databases, Fall 2003 IT University of Copenhagen Lecture 4: Normalization September 16, 2003 Lecturer: Rasmus Pagh Today s lecture What you should remember from previously. Anomalies in

More information

SCHEMA REFINEMENT AND NORMAL FORMS

SCHEMA REFINEMENT AND NORMAL FORMS 19 SCHEMA REFINEMENT AND NORMAL FORMS Exercise 19.1 Briefly answer the following questions: 1. Define the term functional dependency. 2. Why are some functional dependencies called trivial? 3. Give a set

More information

Database Design Theory and Normalization. CS 377: Database Systems

Database Design Theory and Normalization. CS 377: Database Systems Database Design Theory and Normalization CS 377: Database Systems Recap: What Has Been Covered Lectures 1-2: Database Overview & Concepts Lecture 4: Representational Model (Relational Model) & Mapping

More information

BCNF. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong BCNF

BCNF. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong BCNF Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong Recall A primary goal of database design is to decide what tables to create. Usually, there are two principles:

More information

Normalization. Anomalies Functional Dependencies Closures Key Computation Projecting Relations BCNF Reconstructing Information Other Normal Forms

Normalization. Anomalies Functional Dependencies Closures Key Computation Projecting Relations BCNF Reconstructing Information Other Normal Forms Anomalies Functional Dependencies Closures Key Computation Projecting Relations BCNF Reconstructing Information Other Normal Forms Normalization Niklas Fors (niklas.fors@cs.lth.se) Normalization 1 / 45

More information

Dr. Anis Koubaa. Advanced Databases SE487. Prince Sultan University

Dr. Anis Koubaa. Advanced Databases SE487. Prince Sultan University Advanced Databases Prince Sultan University College of Computer and Information Sciences Fall 2013 Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Anis Koubaa SE487

More information

V. Database Design CS448/ How to obtain a good relational database schema

V. Database Design CS448/ How to obtain a good relational database schema V. How to obtain a good relational database schema Deriving new relational schema from ER-diagrams Normal forms: use of constraints in evaluating existing relational schema CS448/648 1 Translating an E-R

More information

Edited by: Nada Alhirabi. Normalization

Edited by: Nada Alhirabi. Normalization Edited by: Nada Alhirabi Normalization Normalization:Why do we need to normalize? 1. To avoid redundancy (less storage space needed, and data is consistent) Ssn c-id Grade Name Address 123 cs331 A smith

More information

Draw A Relational Schema And Diagram The Functional Dependencies In The Relation >>>CLICK HERE<<<

Draw A Relational Schema And Diagram The Functional Dependencies In The Relation >>>CLICK HERE<<< Draw A Relational Schema And Diagram The Functional Dependencies In The Relation I need to draw relational schema and dependency diagram showing transitive and partial Functional dependency and normalization

More information

MODULE: 3 FUNCTIONAL DEPENDENCIES

MODULE: 3 FUNCTIONAL DEPENDENCIES MODULE: 3 (13 hours) Database design: functional dependencies - Inference Rules for Functional Dependencies - Closure -- Minimal Cover -Normal forms First-second and third normal forms Boyce- Codd normal

More information

Desirable database characteristics Database design, revisited

Desirable database characteristics Database design, revisited CMPT 354 Desirable database characteristics Database design, revisited Normal Forms First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Normal forms and functional dependencies

More information

Lecture 6a Design Theory and Normalization 2/2

Lecture 6a Design Theory and Normalization 2/2 CompSci 516 Data Intensive Computing Systems Lecture 6a Design Theory and Normalization 2/2 Instructor: Sudeepa Roy 1 HW1 deadline: Announcements Due on 09/21 (Thurs), 11:55 pm, no late days Project proposal

More information

CS 2451 Database Systems: Database and Schema Design

CS 2451 Database Systems: Database and Schema Design CS 2451 Database Systems: Database and Schema Design http://www.seas.gwu.edu/~bhagiweb/cs2541 Spring 2018 Instructor: Dr. Bhagi Narahari Relational Model: Definitions Review Relations/tables, Attributes/Columns,

More information

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016 Applied Databases Lecture 5 ER Model, normal forms Sebastian Maneth University of Edinburgh - January 25 th, 2016 Outline 2 1. Entity Relationship Model 2. Normal Forms Keys and Superkeys 3 Superkey =

More information

In This Lecture. Normalisation to BCNF. Lossless decomposition. Normalisation so Far. Relational algebra reminder: product

In This Lecture. Normalisation to BCNF. Lossless decomposition. Normalisation so Far. Relational algebra reminder: product In This Lecture Normalisation to BCNF Database Systems Lecture 12 Natasha Alechina More normalisation Brief review of relational algebra Lossless decomposition Boyce-Codd normal form (BCNF) Higher normal

More information

Databases The theory of relational database design Lectures for m

Databases The theory of relational database design Lectures for m Databases The theory of relational database design Lectures for mathematics students April 2, 2017 General introduction Look; that s why there s rules, understand? So that you think before you break em.

More information

Case Study: Lufthansa Cargo Database

Case Study: Lufthansa Cargo Database Case Study: Lufthansa Cargo Database Carsten Schürmann 1 Today s lecture More on data modelling Introduction to Lufthansa Cargo Database Entity Relationship diagram Boyce-Codd normal form 2 From Lecture

More information

Database Systems. Answers

Database Systems. Answers Database Systems Question @ Answers Question 1 What are the most important directories in the MySQL installation? Bin Executable Data Database data Docs Database documentation Question 2 What is the primary

More information

Homework 6: FDs, NFs and XML (due April 15 th, 2015, 4:00pm, hard-copy in-class please)

Homework 6: FDs, NFs and XML (due April 15 th, 2015, 4:00pm, hard-copy in-class please) Virginia Tech. Computer Science CS 4604 Introduction to DBMS Spring 2015, Prakash Homework 6: FDs, NFs and XML (due April 15 th, 2015, 4:00pm, hard-copy in-class please) Reminders: a. Out of 100 points.

More information

Desired properties of decompositions

Desired properties of decompositions Desired properties of decompositions We expect that after decomposition No anomalies and redundancies We can recover the original relation from the tuples in its decompositions We can ensure that after

More information

Database Systems. Basics of the Relational Data Model

Database Systems. Basics of the Relational Data Model Database Systems Relational Design Theory Jens Otten University of Oslo Jens Otten (UiO) Database Systems Relational Design Theory INF3100 Spring 18 1 / 30 Basics of the Relational Data Model title year

More information