Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00.

Slides:



Advertisements
Similar presentations
Microsoft® Access® 2010 Training
Advertisements

CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Six Blind Men and the Elephant. Basic ERD Symbology EntityRelationship AttributeMultivalued Attribute Associative Entity.
1 Class Agenda (04/03 and 04/08)  Review and discuss HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve.
Information System Engineering
Announcements n No class on Thursday Time to get together with your group and work on the project n Office Hours this week: Today: 1:00 to 1:30 Wednesday:
Athabasca University Under Development for COMP 200 Gary Novokowsky
Modeling the Data: Conceptual and Logical Data Modeling
Entity Relationship Diagrams
Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00.
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.
Chapter 3: Data Modeling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
System Analysis and Design
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Chapter 6 Data Flow Diagramming Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Database Applications – Microsoft Access Lesson 2 Modifying a Table and Creating a Form 45 slides in presentation Accessibility check 9/14.
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Class Agenda (11/07 and 11/12)  Review HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve practical.
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.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
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.
Database Normalization Lynne Weldon July 17, 2000.
CORE 2: Information systems and Databases NORMALISING DATABASES.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
DIMENSIONAL MODELLING. Overview Clearly understand how the requirements definition determines data design Introduce dimensional modeling and contrast.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
Data Models and Relational Databases Chapter 2. Learning Objectives Identify primary and foreign keys for each entity and relevant relationships in the.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Storing Organizational Information - Databases
1 A Guide to MySQL 2 Database Design Fundamentals.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Module 2: Information Technology Infrastructure Chapter 5: Databases and Information Management.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart 4-1 Relational Databases.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
MIS2502: Data Analytics Relational Data Modeling
NORMALIZATION. What is Normalization  The process of effectively organizing data in a database  Two goals  To eliminate redundant data  Ensure data.
1 Class Agenda (04/06/2006 and 04/11/2006)  Discuss use of Visio for ERDs  Learn concepts and ERD notation for data generalization  Introduce concepts.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
©2003 Prentice Hall Business Publishing, Accounting Information Systems, 9/e, Romney/Steinbart 4-1 Relational Databases.
RELATIONAL TABLE NORMALIZATION. Key Concepts Guidelines for Primary Keys Deletion anomaly Update anomaly Insertion anomaly Functional dependency Transitive.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
Microsoft Access CS 110 Fall Entity Relationship Model Entities Entities Principal data object about which information is to be collectedPrincipal.
Database Planning Database Design Normalization.
Project Based on fictitious Coffee Roasting CompanyCoffee Roasting Company Automatic Order Processing System – –Process “projected” Accept order from customer.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
DESIGNING DATABASE APPLICATIONS
Chapter 4 Relational Databases
Information Systems Development MIS331
Presentation transcript:

Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00 Friday: 1:30 to 2:30 n Questions regarding Syllabus, Class?

The Coffee Roasting Company Phase I Designing the Database

Overview n Apply normalization process to purchasing cycle documents Purchase Order Receiving Report Payment Voucher n Combine three document sub-schemas into overall schema for purchasing cycle

What is a Database? n Collection of data organized into: Tables (similar to a spreadsheet) – typically associated with an object/item of interest such as a customer, product, etc. –Columns represent fields Attributes and characteristics that describe the object/item in the table A customer has a name, address, phone, etc. –Rows represent an instance of each object/item Plow House, Stayton OR, (503)

Database Rules n Only one type of record in each table If put both customers and suppliers in same table, how can you tell a customer from a supplier? If use an “external entity” table for both customers and suppliers, then a field in the table would be used to identify the type of external entity.

Database Rules n Each record (row) in a table must be unique If two rows were exactly the same: Plow House, Stayton OR, (503) –Is this an error – was the record entered twice by mistake –Which record should you use?

Database Rules n Each row within a table should have a primary key Given that each record must be different in some way, how can you easily find a given record? That is, what field should you use to find each different record Plow House, Stayton OR, (503) Plow House, Corvallis OR, (541) Plow House, Bend OR, (503) Hitching Post, Bend OR, (503)

Database Rules n Characteristics of a Primary Key Must be unique for each row in the table Must be stable over the life of the database –Names are not a good choice – names change –Normally assign an ID number or code Hence extensive use of SSN –Internally generated numbers and codes will be unique and will not change Should make sense from a business perspective –Phone number? Easy to use –Starting to use alphanumeric codes instead of numbers

Design of the Database n Purpose: Capture the information off of the Purchase Cycle forms and set up a database that: Allows easy search and manipulation Reduces amount of redundant information Allows for future expansion and modification of data

What is Database Design? n Process of determining the content and arrangement of data needed to support various activities. n Could use a “Common-sense” approach No way to assure that design works as intended n We will use the “Normalization” Model

What is Normalization? n Technique to “optimize” the design of a Relational Database Break large complex table into smaller, simpler tables Ensure that the smaller tables fit back together. –When break a Whole into its Parts, need to be sure you can recreate the Whole from the Parts

What is Normalization? n Must be familiar with business processes Must understand relationships between purchase order, receiving report and payment voucher –Can multiple purchases arrive on the same receiving report? –Can a single purchase arrive on multiple receiving reports? –Can multiple purchases be paid with the same payment voucher? –If multiple shipments are received, when do we pay?

Overview of Normalization n 1NF: Create two-dimensional tables Identify and define relevant data elements Remove repeating groups Select primary key n 2NF: Ensure full functional dependence on Primary Key n 3NF: Remove transitive dependencies

Normalization Rules n No repeating groups Typically occurs when multiple products on single form Each product should occupy a separate row in the table

First Normal Form Purpose n Organize data in table Rows and Columns Allows flexibility for future expansion n Does not reduce redundancy Merely an organization step to set up for normalization Does include specification of the primary keys

First Normal Form Step 1 n Identify and define relevant data elements Usually, do not include calculated fields –Can be easily derived when needed Exception is when need to store information for historical purposes –We will compute the sales price for a product –Once computed and conveyed to the customer, should not change the price –For example, the underlying base price may change after the order confirmation is sent to the customer

First Normal Form Step 1 – cont’d n As identify fields, define: Data element name Field name within database (normally shorter without spaces or special characters) Type of data to be stored (number, text, date, etc) Size and format of stored data –Number can be integer, single precision, currency, …

First Normal Form Step 1 – cont’d Which items should be included from this form?

First Normal Form Step 2 n Select relevant data elements n Eliminate Repeating Groups Repeating groups occur when multiple items allowed on form –Product name, type, pounds ordered, cost-per- pound are repeated on form Information on each product ordered should be entered into separate row in table

First Normal Form Repeating Groups What information is repeated on this form?

n Information on each product ordered should be entered into separate row in table Note that we can now add multiple products per order by adding rows to the table.

First Normal Form Step 1 n Select relevant data elements n Eliminate Repeating Groups Each product ordered is entered into separate row in table n Select Primary Key Combination of values within certain columns used to distinguish one row from another

Select Primary Key n On forms with repeating information (products): Need one component of key to identify information in the non-repeating section –Top portion of PO form Need one component of key to identify information in the repeating section –Bottom portion of PO form

First Normal Form Select Primary Key Which fields to use? Non-repeating, Repeating

Select Primary Key n Need to develop a product code to use instead of product name Internally assigned, so we know they are unique and stable As new products are added, we will assign new codes Easy to use –First letters of product name

Select Primary Key n Pick combination of: Purchase Order Number –internally assigned, unique Product Code –internally assigned, unique

Purchase Order Form in First Normal Form n PONum and ProdCode will be primary key n No repeating columns of information

Second Normal Form n Only required if primary key is “concatenated” Combination of data elements used in key n Technical definition is Full Functional Dependence All components of key are needed to identify each non-key field in the table n Purpose: Reduce redundancy & eliminate modification anomalies What happens if need to change delivery date of PO ?

Second Normal Form n Identify all possible combinations of Primary Key Components PONum + ProdCode PONum ProdCode n For each non-key data element, determine which combination of key components is needed for unique identification May need to look through multiple documents to understand relationships

Second Normal Form Which non-key fields are functionally dependent on PONum? ProdCode? Combination?

Business Process Assumptions n Unit Cost is negotiated Note cost difference between and

Second Normal Form n PO Products – Combination of PONum & ProdCode is primary key. All non-key fields have full functional dependence on PONum & ProdCode? –Do we always order 400 pounds of GA?

Second Normal Form n Products – ProdCode is primary key. All non-key fields have full functional dependence on ProdCode

Second Normal Form n PO Details – PONum is primary key. All non-key fields have full functional dependence on PONum

Third Normal Form n Remove Transitive Dependencies Technical definition: a non-key field has functional dependence on a non-key field Non-Technical: Fields A, B and C where A is key. –By definition, B and C have dependence on A –What if you could also determine C based on knowledge of B

Transitive Dependency Example –Supplier name is not part of key, yet name can be used to determine sales office, contact, and phone Assuming one contact per supplier

Solution - split Supplier Information into another table n When create supplier table, must select a primary key Name is not a good choice for the key n Create an internally assigned Supplier Code

Transitive Dependency Another problem – Ship Office –Droubi’s has two shipping offices – name/code does not uniquely identify shipping office – need separate table

Solution - split Supplier Shipping Information into another table n Create supplier shipping code

Third Normal Form Tables

Still have a transitive dependency

Transitive Dependency n Does Zip Code determines City and State?

Third Normal Form Tables

n One-to-Many Relationships Single-field primary key always has cardinality of One Multiple-field primary key has cardinality of Many Non-key field that is part of a relationship has cardinality of Many

Receiving Report n First Normal Form Select and define data elements of interest Eliminate repeating groups Identify primary key Specify any assumptions you had to make.

Business Process Assumptions n Only one receiving warehouse n Do we need to assume that the quantities received are the same as quantities ordered?

Eliminate Repeating Groups n Multiple data elements for: Product Name Product Type Quantity Received n Place each “Product” in separate row

Identify Primary Key n Select data element from top (non-repeating) and bottom (repeating) n Best Key: Combination of: RRNumber Product Code –Created for each product

Second Normal Form n Is the FNF table in Second Normal Form? Why or why not? n If not, what are the functional dependencies? n What business process assumptions did you make?

Second Normal Form n Required since primary key is concatenated n Three Combinations RRNum ProdCode RRNum + ProdCode

Third Normal Form n Are the SNF tables in Third Normal Form? Why or why not? n If not, what are the transitive dependencies? n What business process assumptions did you make?

Third Normal Form n From business perspective: Makes sense to put supplier information in separate table -- reduces redundancy n From Normalization perspective: Transitive dependence between: –RRNum –Supplier Name –Supplier Ship Address, CSZ Will also deal with transitive dependence between zip and city state

Practice Exercise

Payment Voucher n First Normal Form Select and define data elements of interest Eliminate repeating groups Identify primary key Business Process Assumptions

Second Normal Form n Is the FNF table in Second Normal Form? Why or why not? n If not, what are the functional dependencies? n What business process assumptions did you make?

Third Normal Form n Are the SNF tables in Third Normal Form? Why or why not? n If not, what are the transitive dependencies? n What business process assumptions did you make?

Assignment n Design Third Normal Form Datadase for Order Fulfillment of CRC You must be able to create these reports from data within the tables. –Sales Order Confirmation –Bill of Lading –Backorder Notice Focus on the data, not the process –Do not worry about what triggers the Backorder Notice, just be able to create the report from the underlying tables

Assignment  Once you have designed the tables:  Use Access to document the relationships between the tables and as your data dictionary  Create empty tables in Access  Enter the abbreviated field names, specify the data type and size, enter the long name as the caption  Set the primary key fields

Assignment  Use the “relationships” feature in Access to define the relationships between tables  Always set to enforce referential integrity

Assignment  Provide a description of the processes that you used to design the third normal form tables. Specifically:  You must justify your selection of fields for the primary keys  You must describe how you know that each table is in third normal form.  Provide all assumptions you had to make regarding the nature of the business operations to support the placement of the various data elements within the tables.

Questions?