Chapter 5: Relational Database Design

Slides:



Advertisements
Similar presentations
Normalization of Database Tables
Advertisements

Chapter 5 Normalization of Database Tables
Database Tables and Normalization
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
DBS201: Introduction to Normalization
1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables Special adaptation for INFS-3200
Normalization of Database Tables
Need for Normalization
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Normalization of Database Tables
4 Chapter 4 Normalization Hachim Haddouti. 4 Hachim Haddouti, CH4, see also Rob & Coronel 2 In this chapter, you will learn: What normalization is and.
Normalization of Database Tables
Normalization of Database Tables
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 5 Normalization of Database Tables
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
5 Chapter 5 Normalization of Database Tables Example Database Systems: Design, Implementation, and Management, Rob and Coronel Special adaptation for INFS-3200.
NORMALIZATION N. HARIKA (CSC).
Chapter 5 Normalization of Database Tables
FUNCTIONAL DEPENDENCIES
Text & Original Presentations
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220m.htm
Database Systems: Design, Implementation, and Management Tenth Edition
Concepts of Database Management, Fifth Edition
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
The Relational Model and Normalization R. Nakatsu.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
Database Design – Lecture 8
Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management Peter Rob & Carlos Coronel.
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
Normalization of Database Tables
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
E-R Modeling: Table Normalization. Normalization of DB Tables Normalization ► Process for evaluating and correcting table structures determines the optimal.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
Normalization Example. Database Systems, 8 th Edition 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Entity Relationship Model: E-R Modeling 1 Database Design.
3 Spring Chapter Normalization of Database Tables.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
5 1 Normalization of Database Tables. 5 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures to minimize.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Normalizing Database Designs. 2 Objectives In this chapter, students will learn: –What normalization is and what role it plays in the database design.
Normalization.
Chapter 4 Logical Database Design and the Relational Model
SEEM3430: Information Systems Analysis and Design
Normalization Karolina muszyńska
Chapter 4: Relational Database Design
Functional Dependencies
Concepts of Database Management Eighth Edition
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Chapter 6 Normalization of Database Tables
Normalization A337.
Normalization of Database Tables Uploaded by: mysoftbooks.ml
Normalization of DB relations examples Fall 2015
Sampath Jayarathna Cal Poly Pomona
DATABASE DESIGN & DEVELOPMENT
Review of Week 3 Relation Transforming ERD into Relations
Presentation transcript:

Chapter 5: Relational Database Design Information Technology Department Bryar Hassan (MSc Eng.) bryar.hassan@kissr.edu.krd

Contents What normalization is and what role it plays in database design About the normal forms 1NF, 2NF, 3NF, BCNF, and 4NF How normal forms can be transformed from lower normal forms to higher normal forms That normalization and E-R modeling are used concurrently to produce a good database design That some situations require denormalization to generate information efficiently Database System Concepts

Database Tables and Normalization Table is basic building block in database design Normalization is process for assigning attributes to entities Reduces data redundancies Helps eliminate data anomalies Produces controlled redundancies to link tables Normalization stages 1NF - First normal form 2NF - Second normal form 3NF - Third normal form 4NF - Fourth normal form Data Anomalies: Data that is noticeable because it is different from what is usual Consistensy: Database System Concepts

Need for Normalization Figure 5.1 Database System Concepts

Figure 5.1 Observations PRO_NUM intended to be primary key Table entries invite data inconsistencies Table displays data anomalies Update Modifying JOB_CLASS Insertion New employee must be assigned project Deletion If employee deleted, other vital data lost Database System Concepts

Conversion to 1NF Repeating groups must be eliminated Proper primary key developed Uniquely identifies attribute values (rows) Combination of PROJ_NUM and EMP_NUM Dependencies can be identified Desirable dependencies based on primary key Less desirable dependencies Partial based on part of composite primary key Transitive one nonprime attribute depends on another nonprime attribute Database System Concepts

Dependency Diagram (1NF) Database System Concepts

Data Organization: 1NF Figure 5.2 Database System Concepts

1F Summarized All key attributes defined No repeating groups in table All attributes dependent on primary key Database System Concepts

Conversion to 2NF Start with 1NF format: Write each key component on separate line Write original key on last line Each component is new table Write dependent attributes after each key PROJECT (PROJ_NUM, PROJ_NAME) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS, CHG_HOUR) ASSIGN (PROJ_NUM, EMP_NUM, HOURS) Database System Concepts

2NF Conversion Results Figure 5.3 Database System Concepts

2NF Summarized In 1NF Includes no partial dependencies No attribute dependent on a portion of primary key Still possible to exhibit transitive dependency Attributes may be functionally dependent on nonkey attributes Database System Concepts

Conversion to 3NF PROJECT (PROJ_NUM, PROJ_NAME) Create separate table(s) to eliminate transitive functional dependencies PROJECT (PROJ_NUM, PROJ_NAME) ASSIGN (PROJ_NUM, EMP_NUM, HOURS) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS) JOB (JOB_CLASS, CHG_HOUR) Database System Concepts

3NF Summarized In 2NF Contains no transitive dependencies Database System Concepts

Normalization and Database Design Normalization should be part of the design process E-R Diagram provides macro view Normalization provides micro view of entities Focuses on characteristics of specific entities May yield additional entities Difficult to separate normalization from E-R diagramming Business rules must be determined Database System Concepts

Initial ERD for Contracting Company Figure 5.8 Database System Concepts

Modified ERD for Contracting Company Figure 5.9 Database System Concepts

Final ERD for Contracting Company Figure 5.10 Database System Concepts

Higher-Level Normal Forms Fourth Normal Form (4NF) Table is in 3NF Has no multiple sets of multivalued dependencies Database System Concepts

Conversion to 4NF Figure 5.12 Set of Tables in 4NF Figure 5.11 Multivalued Dependencies Database System Concepts

De-normalization Normalization is one of many database design goals Normalized table requirements Additional processing Loss of system speed Normalization purity is difficult to sustain due to conflict in: Design efficiency Information requirements Processing Database System Concepts

Un-normalized Table Defects Data updates less efficient Indexing more cumbersome No simple strategies for creating views Database System Concepts

Exercises Consider the below relation and answer the following questions: List all functional dependencies satisfied by the relation Convert the above relation to 1NF, 2NF, 3NF, and then 4NF Database System Concepts