IFS180: Intro. to Data Management Chapter 2 Ensuring your database structure is sound.

Slides:



Advertisements
Similar presentations
Designing MS-Access Tables
Advertisements

Chapter 5 Normalization of Database Tables
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
IFS Intro to Data Management Chapter 1 What is Relational.
Normalization What is it?
Normalisation Ensuring data integrity in database design 1.
Athabasca University Under Development for COMP 200 Gary Novokowsky
Normalization of Database Tables Special adaptation for INFS-3200
Normalization of Database Tables
Fundamentals, Design, and Implementation, 9/e Chapter 4 The Relational Model and Normalization.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
The Relational Database Model:
Chapter 5 Normalization of Database Tables
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
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.
Keys Chapter 8 Database Design for Mere Mortals. Why Keys Are Important They ensure that each record in a table can be properly identified. They help.
Establishing Table Structures Chapter 7 Database Design for Mere Mortals.
Database Design Overview. 2 Database DBMS File Record Field Cardinality Keys Index Pointer Referential Integrity Normalization Data Definition Language.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
Concepts and Terminology Introduction to Database.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
Database Systems: Design, Implementation, and Management Tenth Edition
Module Title? DBMS Normalization. Module Title? DBMS Normalization  Normalization is the process of removing redundant data from tables in order to improve.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Chapter 4 The Relational Model and Normalization.
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.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
Copyright Ó Oracle Corporation, All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
(Spring 2015) Instructor: Craig Duckett Lecture 10: Tuesday, May 12, 2015 Mere Mortals Chap. 7 Summary, Team Work Time 1.
Database Design – Lecture 8
1 Functional Dependencies and Normalization Chapter 15.
Database Principles: Fundamentals of Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables Carlos Coronel, Steven.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
NORMALIZATION. What is Normalization  The process of effectively organizing data in a database  Two goals  To eliminate redundant data  Ensure data.
Database Systems, 8 th Edition Improving the Design Table structures cleaned up to eliminate initial partial and transitive dependencies Normalization.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Lecture # 17 Chapter # 10 Normalization Database Systems.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Understanding Data Storage
A Guide to SQL, Eighth Edition
(Winter 2017) Instructor: Craig Duckett
A brief summary of database normalization
Database Normalization
Chapter 9 Designing Databases
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Normalization Referential Integrity
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
Instructor: Craig Duckett
Relational Database Model
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Database Normalization.
Chapter 4 The Relational Model and Normalization
Presentation transcript:

IFS180: Intro. to Data Management Chapter 2 Ensuring your database structure is sound

Intro. to Data Management Brief Review from last week Function of PK Function of FK One – to – One Relationship One – to – Many Relationship Many – to – Many Relationship

IFS180: Intro. to Data Management Functional Dependencies and Normalization Functional Dependency: A functional dependency occurs when one attribute in a relation uniquely determines another attribute. This can be written A -> B which would be the same as stating "B is functionally dependent upon A." BudsCost = Boxes Buds * $2.25 BudsCost functionally dependant on Number of Boxes Number of Boxes  BudsCost Determinant Determines

IFS180: Intro. to Data Management Functional Dependencies and Normalization Examples: PretzelCost = Bags of Pretzels * $1.39 TotalCost = Quantity * Price

IFS180: Intro. to Data Management Functional Dependencies and Normalization Object ColorWeight Red1 White2 Blue3 Object Color  Weight Object ColorWeightShape Red1Square White2Rectangle Blue3Cylinder Object Color  (Weight, Shape) Color  Zone Color  (Zone, Price)

IFS180: Intro. to Data Management Characteristics of a Relation Rows contain data about an entity Columns contain data about attributes of entity Columns in table hold a single value All entries in columns are of the same kind Each column has a unique name Column order is not important Row order is not important No row duplicates

IFS180: Intro. to Data Management Data 10,000 Feet First Normalized Form (1NF) No Composite attributes in a relation Second Normalized Form (2NF) 1NF and every column is dependent on PK Third Normalized Form (3NF) 2NF and all columns (non Keyed) are not related (mutually independent)

IFS180: Intro. to Data Management 1NF – No composite Attributes Identify all candidate keys Part NumberDescriptionSales OrderSO CustomerShip LocationAttention WPG-6739Chocolate, Milk746538Jim's CandiesDallasKaren COA-7634Cocoa Powder532439House of ChocolatePhiladelphiaPete PJH-6380Chocolate, White All Types of ChocolateNew YorkSteve JDO-8376Chocolate, Dark472350Dark Chocolate SpecialtiesBostonAnn HYT-6594Cocoa Powder948463All Types of ChocolateNew YorkSteve PKD-4872Chocolate652820The Candy ShopBaltimoreTim Candidate Key

IFS180: Intro. to Data Management 2NF All Columns dependent on PK Identify all functional dependencies A  B Part NumberDescriptionSales OrderSO CustomerShip LocationAttention WPG-6739Chocolate, Milk746538Jim's CandiesDallasKaren COA-7634Cocoa Powder532439House of ChocolatePhiladelphiaPete PJH-6380Chocolate, White All Types of ChocolateNew YorkSteve JDO-8376Chocolate, Dark472350Dark Chocolate SpecialtiesBostonAnn HYT-6594Cocoa Powder948463All Types of ChocolateNew YorkSteve PKD-4872Chocolate652820The Candy ShopBaltimoreTim Determinant Dependency

IFS180: Intro. to Data Management 3NF All columns are Mutual Exclusive Review Determinates (from 2NF) and if any are not candidate keys relation is not normalized. Part NumberDescriptionSales OrderSO CustomerShip LocationAttention WPG-6739Chocolate, Milk746538Jim's CandiesDallasKaren COA-7634Cocoa Powder532439House of ChocolatePhiladelphiaPete PJH-6380Chocolate, White All Types of ChocolateNew YorkSteve JDO-8376Chocolate, Dark472350Dark Chocolate SpecialtiesBostonAnn HYT-6594Cocoa Powder948463All Types of ChocolateNew YorkSteve PKD-4872Chocolate652820The Candy ShopBaltimoreTim PED-9283 Cinnamon Jim’s Candies Dallas Karen

IFS180: Intro. to Data Management Validate 3NF Place functional dependency columns into their own relationship New relationship will have a PK = determinant of functional dependency Original relationship will contain the determinate New relation and Original relation will have a referential integrity constraint

IFS180: Intro. to Data Management Ensuring a sound database structure Column (Field Names) Descriptive and meaningful to entire organization Clear and unambiguous Use of acronyms or abbreviation Implicitly or explicitly identify more than one characteristic

IFS180: Intro. to Data Management Order Number Gender Address City State Zip Code Phone Number Name Quantity Cost PARTNO ACTNO SSID UoM / UoP / UoS BoL CofA BOM Order DT SAL ST Why were these shortcuts taken ???

IFS180: Intro. to Data Management Additional Considerations Singular form column names Column Name identifies characteristics of table (3NF violation) Column only contains a single value 641 W. Main St Ephrata PA Northview Dr. Lancaster PA Helps to assure data integrity and accuracy How would these single values be resolved?

IFS180: Intro. to Data Management Additional Considerations Make sure field does not store results of calculations Many violations occur here in the name of performance. Selling Price Labor Cost OVHD Cost Quantity On-Order Account Balance Quantity On-Hand Material Cost Y-T-D Usage P.O. Cost Hours Worked

IFS180: Intro. to Data Management Additional Considerations Multipart Column values (pg 26) Instrument ID GUIT2201 (From experience) Part Number Resolving multi-value columns Break into separate fields in separate tables (and possibly) add a linking table (pg 28)

IFS180: Intro. to Data Management Fine tuning tables Table should represent a single subject Unique name and descriptive to entire org. Is table name accurate, clear and unambiguous Does table name convey physical characteristics Does table name contain acronyms or abbreviations Does table name identify more than one subject

IFS180: Intro. to Data Management Ensuring sound table structure (Again) Table represents a single subject (object or event) Each table has a PK No duplicate values (violation of 3NF). Table contains only functionally dependent columns

IFS180: Intro. to Data Management Key Field Considerations Simple PK vs Composite PK Uniquely ID’s each row Unique values enforce integrity Will the field ever contain duplicates Can field value be optional Multipart field (should have been eliminated) Can the value be modified ** Remain Static **