ISQS 6339, Business Intelligence Database vs. Data Warehouse

Slides:



Advertisements
Similar presentations
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Advertisements

Data Modeling and the Entity-Relationship Model
(wrapping up from last week)
Data Modeling and the Entity-Relationship Model
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 7.
The Relational Model Chapter Two (Excerpts) DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
SQL Views Chapter 3A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started with Microsoft Visio 2010 Appendix G DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started with Microsoft SQL Server 2012 Express Edition Appendix A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 1-1 David M. Kroenke’s Database Processing: Fundamentals, Design, and.
David M. Kroenke and David J. Auer Database Processing—12 th Edition Fundamentals, Design, and Implementation Chapter One: Introduction KROENKE AND AUER.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Why Databases.
Data Modeling and Entity- Relationship Model I IST2101.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Chapter 5 Database Processing.
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 5-1 Chapter Objectives Learn how to transform E-R data models into relational.
SQL Views Appendix E DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
The Relational Model Chapter Two DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Normalization Process: Exercise 1: Step 1 IST2101 Step 1. Identify all the candidate keys of the relation. StudentNumber.
Database Design IST210 Class Lecture
+ Data Modeling (wrapping up from last week). + Homework Review Exercise 4.32 – Develop a data model of a genealogical diagram. Model only biological.
SQL Views Chapter 3A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Structured Query Language (SQL) IST2101. Structured Query Language – Acronym: SQL – Pronounced as “S-Q-L” [“Ess-Que-El”] – Originally developed by IBM.
Chapter 4 Database Processing Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall 4-1.
Data Modeling IST210 Class Lecture.
Getting Started Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
THE RELATIONAL MODEL II IST 210: Organization of Data IST210 1.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
SQL Views Chapter 3A. Appendix Objectives Learn basic SQL statements for creating views Learn basic SQL statements for using views Understand the reasons.
© 2002 by Prentice Hall 1 The Relational Model David M. Kroenke Database Concepts 1e Chapter 2 2.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
ISQS 3358, Business Intelligence Database vs. Data Warehouse
The Relational Model and Database Normalization
Database Design Chapter Five DATABASE CONCEPTS, 4th Edition
The Relational Model Chapter Two DATABASE CONCEPTS, 3rd Edition
Requirements Become the E-R Data Model
ISQS 3358, Business Intelligence Dimensional Modeling
David M. Kroenke and David J
The Relational Model and Normalization
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Normalization Referential Integrity
Database Processing: David M. Kroenke’s Chapter Six:
Database Processing: David M. Kroenke’s Chapter Three:
SQL Views Appendix C DATABASE CONCEPTS, 3rd Edition
David M. Kroenke and David J
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Getting Started Chapter One DATABASE CONCEPTS, 5th Edition
Database Processing: David M. Kroenke’s Chapter Six:
Database Processing: David M. Kroenke’s Chapter Six:
Getting Started Chapter One DATABASE CONCEPTS, 4th Edition
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Presentation transcript:

ISQS 6339, Business Intelligence Database vs. Data Warehouse Zhangxi Lin Texas Tech University 1 1

Agenda Install Parallels (instructions) Test SQL Server 2016 on Parallels Access the shared network drive For MacBook: http://zlin.ba.ttu.edu/3358/MacBookMapping.htm For Windows: Map to \\Techshare\coba\d\isqs3358 Create a database using WPC scripts \\Techshare\coba\d\isqs3358\isqs3348\Exercises\D BC-e07-WPC-Scripts Convert WPC database to data warehouse

Database Review ISQS6339

Purpose of a Database The purpose of a database is to keep track of things. Unlike a list or spreadsheet, a database may store information that is more complicated than a simple list. KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Components of a Database System Figure 1-15: Components of a Database System KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Relational Databases A relational database stores information in tables. Each informational topic is stored in its own table. In essence, a relational database will break-up a list into several parts—one part for each theme in the list. A Project List would be divided into a CUSTOMER Table, a PROJECT Table, and a PROJECT_MANAGER Table. KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Example Database Metadata: A Relationship Diagram Figure 1:16 Example Metadata: A Relationship Diagram for the Art Course Tables in Figure 1-10 KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Normalization Process Identify all the candidate keys of the relation Identify all the functional dependencies in the relation Examine the determinants of the functional dependencies. If any determinant is not a candidate key, the relation is not well formed. Place the columns of the functional dependency in a new relation of their own Make the determinant of the functional dependency the primary key of the new relation. Leave a copy of the determinant as a foreign key in the original relation. Create a referential integrity constraint between the original relation and the new relation. Repeat Step 3 as many times as necessary until every determinant of every relation is a candidate key KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Educations, Inc. Publishing as Prentice Hall

Normal Forms There are many defined normal forms: First Normal Form (1NF) Second Normal Form (2NF) Third Normal Form (3NF) Boyce-Codd Normal Form (BCNF) Fourth Normal Form (4NF) Fifth Normal Form (5NF) Domain/Key Normal Form (DK/NF) KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

This is Boyce-Codd Normal Form (BCNF) Normalization to BCNF For our purposes, a relation is considered normalized when: Every determinant is a candidate key. This is Boyce-Codd Normal Form (BCNF) KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Normalization Example (StudentID) (StudentName, DormName, DormCost) However, if… (DormName) (DormCost) Then DormCost should be placed into its own relation, resulting in the relations: (StudentName, DormName) (StudentID) (DormName) (DormCost) KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Educations, Inc. Publishing as Prentice Hall

Normalization Example (Cont’d) (AttorneyID,ClientID) (ClientName, MeetingDate, Duration) However, if… (ClientID) (ClientName) Then ClientName should be placed into its own relation, resulting in the relations: (AttorneyID,ClientID) (MeetingDate, Duration) (ClientName) (ClientID) KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Educations, Inc. Publishing as Prentice Hall

Levels of Entity Attribute Display Figure 4-3: Levels of Entity Attribute Display KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Relationships Entities can be associated with one another in relationships. Relationship degree defines the number of entity classes participating in the relationship: Degree 2 is a binary relationship. Degree 3 is a ternary relationship. KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Crow’s Foot Symbols Figure 4-8: Crow’s Foot Notation KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Crow’s Foot Example: One-to-Many Relationship Figure 4-7: Two Versions of a 1:N Relationship KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Heather Sweeney Designs: Final Data Model (c) The Finished Data Model Figure 4-21: The Final Data Model for Heather Sweeney Designs KROENKE and AUER - DATABASE CONCEPTS (7th Edition) Copyright © 2015 Pearson Education, Inc. Publishing as Prentice Hall

Database case Find the SQL scripts in \\Techshare\coba\d\isqs3358\isqs3348\Exercises\ Use the scripts in \DBC-e07-WPC Script\ Download file http://zlin.ba.ttu.edu/3358/WPCExercises.docx for the exercises

Wedgewood Pacific Corporation

Wedgewood Pacific Corporation

Incapability of database How could I analyze the performance between departments regarding workload and employee numbers? How could I do online prediction of future projects trend according to current projects? If the database contains 100 million records how could the response time become acceptable?

Data warehousing

Data Mart Planning Fact table – collections of measures Measures: MaxHours, HoursWorked Dimension tables Time: StartDate, EndDate Project Employee Department

Dimensional Model DIM_PROJECT ---------------------- DIM_DEPSRTMENT ProjectID ProjectName Department MaxHours StartDate EndDate …… DIM_DEPSRTMENT --------------------------- DepartmentName BudgetCode OfficeNumber Phone PROJ_ASSIGN ---------------------- EmployeeNumber ProjectID HoursWorked StartDate EndDate DIM_EMPLOYEE ------------------------ EmployeeNumber FirstName LastName Department Phone Email DIM_TIME --------------- Year Quarter Month Week Date

Data Mart Design Fact Table Dimension Tables PROJ_ASSIGN (ProjectID, EmployeeNumber, HoursWorked, StartDate, EndDate) Dimension Tables TIME(Year-Quarter-Month-Date) PROJECT(ProjectID, ProjectName, Department, MaxHours) DEPARTMENT(DepartmentName, BudgetCode, OfficeNumber, Phone) EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Phone, Email)

Data Mart Design – Scheme 2 Fact Table PROJect (ProjectID, ProjectName, Department, MaxHours, StartDate, EndDate) Dimension Tables TIME(Year-Quarter-Month-Date) DEPARTMENT(DepartmentName, BudgetCode, OfficeNumber, Phone) This is a simplified model from the previous