Normalization - Mr. Ahmad Al-Ghoul Data Design. 2 learning Objectives  Explain the concept of table design  Explain unnormalized design and the first.

Slides:



Advertisements
Similar presentations
System Analysis System Analysis - Mr. Ahmad Al-Ghoul System Analysis and Design.
Advertisements

System Planning (Preliminary Investigation Overview)
ERD diagram Data Design - Mr. Ahmad Al-Ghoul
System Analysis and Design
Normalization of Database Tables
Client/Server Databases and the Oracle 10g Relational Database
Normalization of Database Tables
System Analysis System Analysis - Mr. Ahmad Al-Ghoul System Analysis and Design.
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
Chapter 5 Normalization of Database Tables
Introduction to System Analysis and Design - Dr. Mahmoud Abu-Arra - Dr. Mahmoud Abu-Arra - Mr. Ahmad Al-Ghoul System Analysis and Design.
System Analysis and Design
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
System Analysis and Design
System Analysis System Analysis - Mr. Ahmad Al-Ghoul System Analysis and Design.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
System Analysis and Design
NORMALIZATION N. HARIKA (CSC).
PHASE 3: SYSTEMS DESIGN Chapter 7 Data Design.
System Analysis & Design
System Implementation System Implementation - Mr. Ahmad Al-Ghoul System Analysis and Design.
Chapter 5 Normalization of Database Tables
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
System Analysis and Design
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Concepts and Terminology Introduction to Database.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
System Analysis and Design
Avoiding Database Anomalies
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Database Systems: Design, Implementation, and Management Tenth Edition
Concepts of Database Management Sixth Edition Chapter 5 Database Design 1: Normalization.
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.
1 A Guide to MySQL 2 Database Design Fundamentals.
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.
System Analysis System Analysis - Mr. Ahmad Al-Ghoul System Analysis and Design.
System Planning (Preliminary Investigation Overview)
- Ahmad Al-Ghoul Data design. 2 learning Objectives Explain data design concepts and data structures Explain data design concepts and data structures.
System Implementation
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
System Implementation System Implementation - Mr. Ahmad Al-Ghoul System Analysis and Design.
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
Software Engineering Software Engineering - Mr. Ahmad Al-Ghoul.
Normalization of Database Tables
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Normalization Data Design - Mr. Ahmad Al-Ghoul
Concepts of Database Management Seventh Edition Chapter 5 Database Design 1: Normalization.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
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.
A Guide to SQL, Eighth Edition
SEEM3430: Information Systems Analysis and Design
MIS 322 – Enterprise Business Process Analysis
Functional Dependencies
Chapter 9 Designing Databases
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Concepts of Database Management Eighth Edition
System Analysis and Design
A Normalization Example
System Analysis and Design
Database Design Chapter 7.
Presentation transcript:

normalization - Mr. Ahmad Al-Ghoul Data Design

2 learning Objectives  Explain the concept of table design  Explain unnormalized design and the first normal form (1NF)

3 Normalization Normalization Normalization Normalization Normalization is a process by which analysts identify and correct inherent problems and complexities in their table designs. Normalization is a process by which analysts identify and correct inherent problems and complexities in their table designs. Table design Table design Table design Table design A table design specifies the fields and identifies the primary key in a particular table or file. A table design specifies the fields and identifies the primary key in a particular table or file. You will use normalization to develop an overall database design that is simple, flexible, and free of data redundancy You will use normalization to develop an overall database design that is simple, flexible, and free of data redundancy In addition to being simpler and more stable, normalized data structure are more easily maintained than other data structure In addition to being simpler and more stable, normalized data structure are more easily maintained than other data structure Involves four stages: unnormalized design, first normal form, second normal form, and third normal form Involves four stages: unnormalized design, first normal form, second normal form, and third normal form Most business-related databases must be designed in third normal form Most business-related databases must be designed in third normal form

4 Normalization Standard Notation Format Standard Notation Format Designing tables is easier if you use a standard notation format to show a table’s structure, fields, and primary key Designing tables is easier if you use a standard notation format to show a table’s structure, fields, and primary keystandard notation formatstandard notation format Standard notation format starts with the name of the table, followed by a parenthetical expression that contains the fieldnames separated by commas, the primary key field is underlined Standard notation format starts with the name of the table, followed by a parenthetical expression that contains the fieldnames separated by commas, the primary key field is underlined Example: NAME (FIELD 1, FIELD 2, FIELD 3)

5 Normalization Repeating Groups and Unnormalized Design Repeating Groups and Unnormalized Design Repeating group: is a set of one or more fields that can occur any number of times in a single record, with each occurrence having different values. Repeating group: is a set of one or more fields that can occur any number of times in a single record, with each occurrence having different values. Repeating group Repeating group Often occur in manual documents prepared by users Often occur in manual documents prepared by users Unnormalized design Unnormalized design Unnormalized An unnormalized record is one that contains a repeating group, which means that a single record has multiple occurrences of a particular field, with each occurrence having different values. An unnormalized record is one that contains a repeating group, which means that a single record has multiple occurrences of a particular field, with each occurrence having different values.

6 Normalization In the ORDER table design, records 1 and 2 have repeating groups because they contain several products. ORDER-NUM is the primary key for the ORDER table, and PRODUCT-NUM serves as a primary key for the repeating group. Because it contains a repeating group, the ORDER table design is unnormalized. Repeating groups [1]

7 Normalization Now let’s review the unnormalized ORDER table design. Following the notation guidelines, you can describe it as follows: Now let’s review the unnormalized ORDER table design. Following the notation guidelines, you can describe it as follows: ORDER (ORDER-NUM, ORDER-DATE, (PRODUCT-NUM, PRODUCT-DESC, NUM- ORDERED)) ORDER (ORDER-NUM, ORDER-DATE, (PRODUCT-NUM, PRODUCT-DESC, NUM- ORDERED)) The ORDER-NUM field is underlined to show that it is the primary key The ORDER-NUM field is underlined to show that it is the primary key The PRODUCT-NUM is also underlined because it acts as the primary key of the repeating group The PRODUCT-NUM is also underlined because it acts as the primary key of the repeating group

8 Normalization First Normal Form First Normal Form A table is in first normal form (1NF) if it does not contain a repeating group A table is in first normal form (1NF) if it does not contain a repeating groupfirst normal form (1NF)repeating groupfirst normal form (1NF)repeating group To convert, you must expand the table’s primary key to include the primary key of the repeating group To convert, you must expand the table’s primary key to include the primary key of the repeating group Let us look to previous example again Let us look to previous example again When you expand the primary key of ORDER table to include PRODUCT-NUM, you eliminate the repeating group and the ORDER table is now in 1NF When you expand the primary key of ORDER table to include PRODUCT-NUM, you eliminate the repeating group and the ORDER table is now in 1NF ORDER (ORDER-NUM, ORDER-DATE, PRODUCT-NUM, PRODUCT-DESC, NUM-ORDERED) ORDER (ORDER-NUM, ORDER-DATE, PRODUCT-NUM, PRODUCT-DESC, NUM-ORDERED)

9Normalization The ORDER table as it appears in 1NF. The repeating groups have been eliminated. Notice that the repeating group for order has become three separate records, and the repeating group for order has become two separate records. The 1NF primary key is a combination of ORDER-NUM and PRODUCT-NUM, which uniquely identifies each record. [1]

10 Normalization Note that neither ORDER-NUM nor PRODUCT- NUM does not uniquely identify each product in a multiple item product Note that neither ORDER-NUM nor PRODUCT- NUM does not uniquely identify each product in a multiple item product Each record must reflect a specific product in a specific order, you need both fields, ORDER- NUM and PRODUCT-NUM, to identify a single record uniquely. Each record must reflect a specific product in a specific order, you need both fields, ORDER- NUM and PRODUCT-NUM, to identify a single record uniquely. The primary key in this example is the combination of two fields: ORDER-NUM and PRODUCT-NUM The primary key in this example is the combination of two fields: ORDER-NUM and PRODUCT-NUM

11 Normalization 1NF 1NF All key attributes defined All key attributes defined No repeating groups in a table No repeating groups in a table All attributes dependent on a primary key All attributes dependent on a primary key

12 Normalization Dependencies Dependencies Dependencies can be identified Dependencies can be identified functional dependency ( desirable dependencies) based on primary key functional dependency ( desirable dependencies) based on primary key Less desirable dependencies Less desirable dependencies partial partial - based on part of composite primary key - based on part of composite primary key transitive transitive - one nonprime attribute depends on anther nonprime attribute - one nonprime attribute depends on anther nonprime attribute

13 Sequence Summary Repeating group: is a set of one or more fields that can occur any number of times in a single record, with each occurrence having different values Repeating group: is a set of one or more fields that can occur any number of times in a single record, with each occurrence having different values An unnormalized record is one that contains a repeating group An unnormalized record is one that contains a repeating group Normalization is a process for avoiding problems in data design Normalization is a process for avoiding problems in data design A table is in first normal form (1NF) if it does not contain a repeating group A table is in first normal form (1NF) if it does not contain a repeating group To convert, you must expand the table’s primary key to include the primary key of the repeating group To convert, you must expand the table’s primary key to include the primary key of the repeating group

14 Sequence Summary In this Sequence we have In this Sequence we have  Defined the term normalization  Explained table design  Defined the standard notation format  Defined and discussed the repeating groups and unnormalized design  Explained the first normal form (1NF)  Explained the different types of attributes dependencies

15 Reference [1] System Analysis and Design, Sixth Edition Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Publisher: SHELLY CASHMAN SEWIES. Publisher: SHELLY CASHMAN SEWIES.