Presentation is loading. Please wait.

Presentation is loading. Please wait.

ISQS 6339, Business Intelligence Database vs. Data Warehouse

Similar presentations


Presentation on theme: "ISQS 6339, Business Intelligence Database vs. Data Warehouse"— Presentation transcript:

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

2 Agenda Install Parallels (instructions)
Test SQL Server 2016 on Parallels Access the shared network drive For MacBook: 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

3 Database Review ISQS6339

4 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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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

17 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

18 Database case Find the SQL scripts in \\Techshare\coba\d\isqs3358\isqs3348\Exercises\ Use the scripts in \DBC-e07-WPC Script\ Download file for the exercises

19 Wedgewood Pacific Corporation

20 Wedgewood Pacific Corporation

21 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?

22 Data warehousing

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

24 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 DIM_TIME Year Quarter Month Week Date

25 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, )

26 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


Download ppt "ISQS 6339, Business Intelligence Database vs. Data Warehouse"

Similar presentations


Ads by Google