1 / 12

Análisis dimensional

Análisis dimensional. Aplicaciones del Análisis de Datos: Formular queries Extraer datos aggregados Analizar resultados Visualizar resultados

Download Presentation

Análisis dimensional

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Análisis dimensional • Aplicaciones del Análisis de Datos: • Formular queries • Extraer datos aggregados • Analizar resultados • Visualizar resultados • El conjunto de datos se representa como un espacio n-dimensional. La reducción dimensional se ejecuta mediante la sumarización sobre las dimensiones que son dejadas de lado

  2. Ejemplo • Ventas (storeId,itemId,timeId,…,monto) • Store(storeId,nombre,region,pais,ciudad) Sumarizar por region: SELECT region,sum(monto) FROM Ventas V, Store S WHERE V.sotreId=S.storeId GROUP BY region

  3. Sumarización • Un problema n-dimensional se representa en un archivo de 2 dimensiones, con n dominions de atributos. • Ej.: Clima(tiempo,lat.long,altit,temp, presion) 4 dimensiones, 2 medidas.

  4. Problemas del Group By • Es complicado para : • Histogramas • Roll-up • Subtotales, drill-dpown • Cross-tabs

  5. Problemas (cont.) • Histogramas • SELECT day,pais,max(temp) FROM ( SELECT day(time) as day, nation (lat,long) as pais FROM clima) as foo Group by day,pais Primero debe armar la tabla y luego agrupar.

  6. Roll-up/drill-down Roll-Up

  7. Solución en SQL

  8. Problema • Aumento de la cantidad de columnas • P.ej: 6 dimensiones =>64 columnas • Alternativa: introducir un valor “ALL”. El nro de columnas permanece constante

  9. Data Cube

  10. Data Cube (cont.)

  11. Data Cube (cont.)

  12. Operador CUBE en SQL SELECT “ALL”, “ALL, “ALL”, SUM (ventas) FROM Sales UNION SELECT Modelo, “ALL, “ALL”, SUM (ventas) FROM Sales GROUP BY Modelo UNION SELECT Modelo, “ALL”,Color, SUM (ventas) FROM Sales GROUP BY Modelo,Color UNION ……

More Related