• DocumentCode
    1419049
  • Title

    Horizontal Aggregations in SQL to Prepare Data Sets for Data Mining Analysis

  • Author

    Ordonez, Carlos ; Chen, Zhibo

  • Author_Institution
    Dept. of Comput. Sci., Univ. of Houston, Houston, TX, USA
  • Volume
    24
  • Issue
    4
  • fYear
    2012
  • fDate
    4/1/2012 12:00:00 AM
  • Firstpage
    678
  • Lastpage
    691
  • Abstract
    Preparing a data set for analysis is generally the most time consuming task in a data mining project, requiring many complex SQL queries, joining tables, and aggregating columns. Existing SQL aggregations have limitations to prepare data sets because they return one column per aggregated group. In general, a significant manual effort is required to build data sets, where a horizontal layout is required. We propose simple, yet powerful, methods to generate SQL code to return aggregated columns in a horizontal tabular layout, returning a set of numbers instead of one number per row. This new class of functions is called horizontal aggregations. Horizontal aggregations build data sets with a horizontal denormalized layout (e.g., point-dimension, observation-variable, instance-feature), which is the standard layout required by most data mining algorithms. We propose three fundamental methods to evaluate horizontal aggregations: CASE: Exploiting the programming CASE construct; SPJ: Based on standard relational algebra operators (SPJ queries); PIVOT: Using the PIVOT operator, which is offered by some DBMSs. Experiments with large tables compare the proposed query evaluation methods. Our CASE method has similar speed to the PIVOT operator and it is much faster than the SPJ method. In general, the CASE and PIVOT methods exhibit linear scalability, whereas the SPJ method does not.
  • Keywords
    SQL; data mining; data preparation; CASE method; PIVOT operator; SPJ method; SQL aggregation; SQL code; data mining; data sets preparation; horizontal aggregations; horizontal denormalized layout; horizontal tabular layout; instance-feature; observation-variable; point-dimension; Aggregates; Algorithm design and analysis; Clustering algorithms; Data mining; Layout; Marketing and sales; Query processing; Aggregation; SQL.; data preparation; pivoting;
  • fLanguage
    English
  • Journal_Title
    Knowledge and Data Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    1041-4347
  • Type

    jour

  • DOI
    10.1109/TKDE.2011.16
  • Filename
    5680905