MIS2502: Data Analytics Coverting ERD into a DB Schema David Schuff

Slides:



Advertisements
Similar presentations
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Advertisements

Entity-Relationship Model and Diagrams (continued)
3-1 Chapter 3 Data and Knowledge Management
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Terms - data,information, file record, table, row, column, transaction, concurrency Concepts - data integrity, data redundancy, Type of databases – single-user,
Database – Part 2a Dr. V.T. Raja Oregon State University.
MIS2502: Data Analytics Relational Data Modeling
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Chapter 5 Database Processing.
Review Session What is data, what is information, and give a real world example to differentiate these two concepts.
Database Design Concepts
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
PLUG IT IN 3 Fundamentals of Relational Database Operations.
SQL 1: GETTING INFORMATION OUT OF A DATABASE MIS2502 Data Analytics.
Organizing Data Revision: pages 8-10, 31 Chapter 3.
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
Slide 1 Object Persistence Design Chapter 13 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by.
MIS2502: Data Analytics SQL – Getting Information Out of a Database David Schuff
MIS2502: Data Analytics The Information Architecture of an Organization.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
Database Fundamentals CSC105 Furman University Peggy Batchelor.
Relational Theory and Design
Chapter 5 DATA WAREHOUSING Study Sections 5.2, 5.3, 5.5, Pages: & Snowflake schema.
Competitive (Business) Intelligence Systems The Road to Denormalization (starring Charlie Sheen & other Random Celebrities)
Foundations of Business Intelligence: Databases and Information Management.
Lesson 2: Designing a Database and Creating Tables.
MIS2502: Data Analytics Relational Data Modeling
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
MIS2502: Data Analytics SQL – Putting Information Into a Database David Schuff
RELATIONAL DATA MODELING MIS2502 Data Analytics. What is a model? Representation of something in the real world.
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
MIS2502: Data Analytics SQL – Getting Information Out of a Database.
MIS2502: Data Analytics Relational Data Modeling David Schuff
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
What Do You Do With Data? Gather Store Retrieve Interpret.
Microsoft Access 2010 Chapter 11 Database Design.
Exam 2 Review: SQL In, Dimensional Modeling, Pivot Tables, ETL Describe data cube elements Understand facts, dimensions, granularity Create/read a Star.
Hoi Le. Why database? Spreadsheet is not good to: Store very large information Efficiently update data Use in multi-user mode Hoi Le2.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Jaclyn Hansberry MIS2502: Data Analytics The Things You Can Do With Data The Information Architecture of an Organization Jaclyn.
Database Development Lifecycle
Revised: 2 April 2004 Fred Swartz
MIS2502: Data Analytics Relational Data Modeling
MIS5101: Business Intelligence Relational Data Modeling
Databases and Information Management
The 1:M Relationship (continued)
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Review for Exam 1 JaeHwuen Jung
MIS2502: Data Analytics Converting ERDs to Schemas
MIS2502: Data Analytics SQL – Getting Information Out of a Database Part 2: Advanced Queries Aaron Zhi Cheng
MIS2502: Data Analytics The Information Architecture of an Organization David Schuff
MIS2502: Data Analytics The Information Architecture of an Organization Acknowledgement: David Schuff.
MIS2502: Data Analytics The Information Architecture of an Organization Aaron Zhi Cheng Acknowledgement:
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics SQL – Putting Information Into a Database
MIS2502: Data Analytics Relational Data Modeling
Databases and Information Management
MIS2502: Review for Exam 1 Aaron Zhi Cheng
MIS2502: Data Analytics SQL – Putting Information Into a Database
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling 2
MIS2502: Data Analytics Relational Data Modeling 3
Shelly Cashman: Microsoft Access 2016
Presentation transcript:

MIS2502: Data Analytics Coverting ERD into a DB Schema David Schuff

Data interpretation, visualization, communication The agenda for the course Weeks 1 through 5 Weeks 6 through 9 Weeks 10 through 14 Transactional Database (Relational DB) Transactional Database (Relational DB) Analytical Data Store (Dimensional DB) Stores real-time transactional data Stores historical transactional and summary data Data entry Data extraction Data analysis Relational Modeling using ERD Normalized Schema Creation SQL Dimensional Modeling Star Schema Creation ETL Pivot Tables Visualizations SAS EM

Implementing the ERD As a database schema – A map of the tables and fields in the database – This is what is implemented in the database management system – Part of the “design” process A schema actually looks a lot like the ERD – Entities become tables – Attributes become fields – Relationships can become additional tables

The Rules Primary key field of “1” table put into “many” table as foreign key field 1:many relationships Create new table 1:many relationships with original tables many:many relationships Primary key field of one table put into other table as foreign key field 1:1 relationships 1. Create a table for every entity 2. Create table fields for every entity’s attributes 3. Implement relationships between the tables

The ERD Based on the Problem Statement

Our Order Database schema Order-Product is a decomposed many-to-many relationship Order-Product has a 1:n relationship with Order and Product Now an order can have multiple products, and a product can be associated with multiple orders Original 1:n relationship Original n:n relationship

The Customer and Order Tables: The 1:n Relationship CustomerIDFirstNameLastNameCityStateZip 1001 GregHousePrincetonNJ LisaCuddyPlainsboroNJ JamesWilsonPittsgroveNJ EricForemanWarminsterPA19111 Order Number OrderDateCustomer ID Customer Table Order Table Customer ID is a foreign key in the Order table. We can associate multiple orders with a single customer! In the Order table, Order Number is unique; Customer ID is not!

The Customer and Order Tables: Normalization CustomerIDFirstNameLastNameCityStateZip 1001GregHousePrincetonNJ LisaCuddyPlainsboroNJ JamesWilsonPittsgroveNJ EricForemanWarminsterPA19111 Order Number OrderDateCustomer ID Customer Table Order Table No repeating orders or customers. Every customer is unique. Every order is unique. This is an example of normalization..

Normalization Organizing data to minimize redundancy (repeated data) This is good for two reasons – The database takes up less space – Fewer inconsistencies in your data If you want to make a change to a record, you only have to make it in one place – The relationships take care of the rest

To figure out who ordered what Match the Customer IDs of the two tables, starting with the table with the foreign key (Order): We now know which order belonged to which customer – This is called a join Order Number OrderDateCustomer ID FirstNameLastNameCityStateZip GregHousePrincetonNJ LisaCuddyPlainsboroNJ GregHousePrincetonNJ EricForemanWarminsterPA19111 Order Table Customer Table

Now the many:many relationship Order Number OrderDateCustomer ID Order Table ProductIDProductNamePrice 2251 Cheerios Bananas Eggo Waffles2.99 Product Table Order ProductID Order number Product IDQuantity Order-Product Table This table relates Order and Product to each other!

To figure out what each order contains Match the Product IDs and Order IDs of the tables, starting with the table with the foreign keys (Order-Product): Order ProductID Order Number Product IDQuantityOrder Number Order Date Customer IDProduct ID Product NamePrice Cheerios Bananas Eggo Waffles Cheerios Bananas Eggo Waffles Eggo Waffles2.99 Order-Product Table Order Table Product Table So which customers ordered Eggo Waffles (by their Customer IDs)?

In Class Exercise

Converting to a DB Schema