Overview
Anlisis de los Procesos de Negocios Data Warehousing System Modelando un Data Warehouse Escogiendo el Grain (Alcance-Nivel Detalle) Estableciendo Dimensiones Estableciendo la Fact Table Implementando el Esquema Estrella (Star Schema)
Sales
Production
OLTP
Accounting OLTP
Enterprise Data
Purchasing
OLTP
Fact Table
Geographic
Product
Measures
Product
Time
Units
$
Facts
Time
. . .
Product_Dim
ProductKey ProductID
. . .
. . .
Shipper_Dim
ShipperKey ShipperID
. . .
Customer_Dim
. . . Mg. Ing. Oscar Zocn Alva
CustomerKey CustomerID
. . .
. . .
Product_Dim Time_Dim
TimeKey TheDate
ProductKey ProductID
Sales_Fact
Dimensional Keys TimeKey TimeKey EmployeeKey ProductKey CustomerKey ShipperKey RequiredDate
. . .
. . .
Multipart Key
Shipper_Dim
ShipperKey ShipperID . .ShipperKey
. . .
Product_Dim
ProductKey Product Name Product Size Product Brand ID
. . .
Product_Brand_Id
Product Brand Product Category ID
Product_Category_Id
Product Category Product Category ID
Escogiendo un Esquema
Star Comprensin del Modelo Nmero de Tablas Complejidad de las Consultas Performance de las Consultas Fcil Menos Simple Rpido Snowflake Ms Difcil Ms Ms Complejo Lento
Jerarqua Separada
Store Location Continent Continent Country
Country Region
Region City City Store Store 01
Finanzas
Logstica
One instance exist and is shared among data marts Time Mltiples instancias existen en data marts individuales
Comercial
Finanzas
Definiendo Precalculaciones
Fact Table
30 ~ ~ ~ ~ ((Price - (Price X Discount)) - Rebate) = Extended Price 8 ~ ~ ~ ~ 5 10.00 .10 5.00 4.00
...
...
Fact Table
...
...
...
...
Creando Tablas
Creando un Tabla Especificando NULL o NOT NULL Generando Valores a las Columnas. Caso de los Surrogate Key, propiedad IDENTITY
Creando Constraints
Usando PRIMARY KEY Constraints No permite valores duplicados Se crean ndice No permite valores NULL Usando FOREIGN KEY Constraints Define una referencia de una columna con PRIMARY KEY or UNIQUE constraint Especifica que valores son aceptados en la Base de Datos
Creando Indices
Pasos para Crear Indices en el Data Warehouse 1 Definir una primary key a las tablas 2 dimensin 3 Declarar relaciones con foreign key 4 Definir la primary key en la fact table Definir ndices en c/foreign key de la fact table Usar Surrogate Keys Usar Indices Clustered Usar Indices Nonclustered Crear Indices Compuestos
Mg. Ing. Oscar Zocn Alva
Recommended Practices
Use Star Schema to Model Data Mart or Data Warehouse Database Choose Grain Use Single Element Surrogate Keys When Defining Dimensions Define Shared Dimensions Do Not Mix Grain in Individual Fact Table Attributes Use Facts That Are Both Numeric and Additive
Mg. Ing. Oscar Zocn Alva