Review of Week 3 Relation Transforming ERD into Relations

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
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.
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Chapter 5 Normalization of Database Tables
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Text & Original Presentations
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220m.htm
CMPE 226 Database Systems September 16 Class Meeting Department of Computer Engineering San Jose State University Fall 2015 Instructor: Ron Mak
Database Systems: Design, Implementation, and Management Tenth 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.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
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.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
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
©NIIT Normalizing and Denormalizing Data Lesson 2B / Slide 1 of 18 Objectives In this section, you will learn to: Describe the Top-down and Bottom-up approach.
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.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Logical Database Design and the Relational Model.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Lecture 4: Logical Database Design and the Relational Model 1.
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 5: Relational Database Design
Normalization Karolina muszyńska
Chapter 4: Relational Database Design
Chapter 5: Logical Database Design and the Relational Model
Functional Dependencies
Example Question–Is this relation Well Structured? Student
CMPE 226 Database Systems February 21 Class Meeting
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Chapter 9 Normalizing Database Designs
Chapter 6 Normalization of Database Tables
Normalization A337.
Normalization of Database Tables Uploaded by: mysoftbooks.ml
DATABASE DESIGN & DEVELOPMENT
Presentation transcript:

Review of Week 3 Relation Transforming ERD into Relations Map entity Map relationship: 1-1, 1-M, M-N Functional dependency Primary key definition Partial Transitive Database Management Systems

Module 2 Database Design Concepts

Chapter 5 Normalization of Database Tables Module 2: Database Design Concepts

Normalization Process for evaluating and improving table structures to minimize data redundancies Process of decomposing relations with anomalies to produce smaller, well-structured relations 1NF 2NF 3NF Database Management Systems

Well Structured Relations A well structured relation contains minimal redundancy and allows users to insert, modify and delete the rows in a table without errors or inconsistencies. General rule of thumb: a relation should not pertain to more than one entity Database Management Systems

Data Anomalies Redundancies or anomalies are errors or inconsistencies that may result when a user attempts to update a table that contains redundant data. There are three types: Insertion anomaly: adding new rows forces user to create duplicate data Deletion anomaly: deleting rows may cause a loss of data that would be needed for other future rows Update anomaly: changing data in a row forces changes to other rows because of duplication Database Management Systems

A Table in the Report Format Database Management Systems

Examples of Data Anomalies Insertion anomaly: a new project or a new employee Deletion anomaly: remove a project or an employee Update anomaly: modify Job_class for employee 105 (many alterations), or 103 (lost information on Elec. Engineer) Database Management Systems

Conversion to 1NF Relational database design is required to be in first normal form (1NF) Three steps Database Management Systems

Step 1: Eliminate the Repeating Groups Present data in a tabular format, where each cell has a single value and there are no repeating groups Eliminate repeating groups by eliminating nulls, making sure that each repeating group attribute contains an appropriate data value Database Management Systems

Data Organization: Step 1 Database Management Systems

Step 2: Identify Primary Key Primary key must uniquely identify attribute value New key must be composed Database Management Systems

Step 3: Identify all Dependencies Dependency diagram: Depicts all dependencies found within a given table structure Helpful in getting bird’s-eye view of all relationships among a table’s attributes Makes it much less likely that an important dependency will be overlooked Database Management Systems

A Dependency Diagram: First Normal Form (1NF) Database Management Systems

First Normal Form Tabular format in which: All key attributes are defined There are no repeating groups in the table All attributes are dependent on primary key All relational tables satisfy 1NF requirements Some tables contain partial dependencies Dependencies based on only part of the primary key Sometimes used for performance reasons, but should be used with caution Still subject to data redundancies Database Management Systems

Conversion to 2NF Relational database design can be improved by converting the database into second normal form (2NF) Two steps Database Management Systems

Step 1: Identify All Key Components Write each key component on separate line, and then write the original (composite) key on the last line Each component will become the key in a new table Database Management Systems

Step 2: Identify the Dependent Attributes Determine which attributes are dependent on which other attributes At this point, most anomalies have been eliminated Database Management Systems

Second Normal Form (2NF) Conversion Results Database Management Systems

Second Normal Form Table is in second normal form (2NF) if: It is in 1NF and It includes no partial dependencies: No attribute is dependent on only a portion of the primary key Database Management Systems

Conversion to 3NF Data anomalies created are easily eliminated by completing three steps Database Management Systems

Step 1: Identify Each New Determinant For every transitive dependency, write its determinant as a PK for a new table Determinant Any attribute whose value determines other values within a row Database Management Systems

Step 2: Identify the Dependent Attributes Identify the attributes dependent on each determinant identified in Step 1 and identify the dependency Name the table to reflect its contents and function Database Management Systems

Step 3: Remove Transitive Dependencies Eliminate all dependent attributes in transitive dependencies from each table that has such a transitive relationship Draw a new dependency diagram to show all tables defined in Steps 1–3 Check new tables and modified tables from Step 3 to make sure that each has a determinant and does not contain inappropriate dependencies Database Management Systems

Third Normal Form (3NF) Conversion Results Database Management Systems

Third Normal Form A table is in third normal form (3NF) if: It is in 2NF and It contains no transitive dependencies Database Management Systems

Improving the Design Table structures are cleaned up to eliminate the troublesome initial partial and transitive dependencies Normalization cannot, by itself, be relied on to make good designs It is valuable because its use helps eliminate data redundancies Database Management Systems

The Completed Database Database Management Systems

The Completed Database (cont’d) Database Management Systems

Activity Table P5.11 on Page 216 Database Management Systems

Normalization and Data Design Normalization should be part of design process Make sure that proposed entities meet required normal form before table structures are created Many real-world databases have been improperly designed or burdened with anomalies if improperly modified during course of time Database Management Systems

Normalization and Data Design (continued) ER diagram Provides the big picture, or macro view, of an organization’s data requirements and operations Created through an iterative process Identifying relevant entities, their attributes and their relationship Use results to identify additional entities and attributes Database Management Systems

Normalization and Data Design (continued) Normalization procedures Focus on the characteristics of specific entities A micro view of the entities within the ER diagram Difficult to separate normalization process from ER modeling process Two techniques should be used concurrently Database Management Systems

The Initial ERD Database Management Systems

The Modified ERD Database Management Systems

The Final ERD Database Management Systems

Higher-Level Normal Forms BCNF 4NF 5NF Database Management Systems

Denormalization Creation of normalized relations is important database design goal Processing requirements should also be a goal If tables decomposed to conform to normalization requirements Number of database tables expands Database Management Systems

Denormalization (continued) Joining larger number of tables takes additional disk input/output (I/O) operations and processing logic Reduces system speed Conflicts among design efficiency, information requirements, and processing speed are often resolved through compromises that may include denormalization Database Management Systems

Denormalization (continued) Use denormalization cautiously Understand why—under some circumstances—unnormalized tables are a better choice Database Management Systems

Wrap Up Review course website Assignment 4-1 Assignment 4-2 https://online.franklin.edu/CourseLogin?section=comp281-v1ff Assignment 4-1 Use the table P5.15 on page 217 as the initial relation, and normalize it to 3NF Assignment 4-2 In assignment4-2.doc Database Management Systems