数据仓库数据挖掘方面的!
联机丛书上有一点资料!

解决方案 »

  1.   

    Hierarchical Rowsets
    A rowset is an OLE DB object that consists of data organized as a grid of rows and named, typed columns. Typically, a rowset contains a result set from a database query, but the data can come from any source.In a hierarchical rowset, one or more columns are themselves rowsets. The individual column values are references to subsets, called chapters, of the column rowset. A chapter can include none, some, or all of its rows. The column rowsets can themselves have one or more columns that are rowsets, nested to an arbitrary level.Using the Data Shaping Service for OLE DB
    Hierarchical rowsets are often generated with the Microsoft® Data Shaping Service for OLE DB. This provider supports the Shape language, which allows rowset hierarchies to be constructed from rowsets obtained from an OLE DB data provider. The Shape Append command appends one or more child rowsets as columns to a parent rowset, and assigns a reference to a chapter to each row value in each appended column. For example:SHAPE {SELECT au_id, au_lname, au_fname FROM authors} 
    APPEND ({SELECT au_id, title FROM titleauthor TA, titles TS 
                WHERE TA.title_id = TS.title_id}
            AS title_chap RELATE au_id TO au_id)This command creates a parent rowset from table authors and appends a child rowset in a column named title_chap. Each row value in title_chap is a reference to the subset of the child rowset that has the same value in its au_id column as in the au_id column of the parent rowset for that row. The tables referenced by this command are in the pubs database that is supplied with Microsoft SQL Server™ 2000.