Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

1204


Part IX: Business Intelligence


Creating a Cube
The data source view forms the basis for creating the cubes, which in turn present data to
database users. Running the Cube Wizard generally provides a good fi rst draft of a cube. Begin
by right-clicking the Cubes folder and selecting New, and then work through these pages:

■ Select Build Method: Choose Use Existing Tables. The Generate Tables in the Data
Source option is outlined previously in the Quick Start section. The option Create
an Empty Cube essentially bypasses the wizard.

■ (^) Select Measure Group Tables: Choose the appropriate data source view from the
drop-down, and then indicate which tables to use as fact tables (measure groups).
Pressing the Suggest button makes an educated guess at which tables to check but
is not always accurate.
■ (^) Select Measures: Each numeric column is assumed to be a measure. Check/uncheck
columns as appropriate; you can also add/remove/adjust measures later.
■ (^) Select Existing Dimensions: If the current project already has dimensions defi ned,
then this page displays to allow those dimensions to be included in the new cube.
Check/uncheck dimensions as appropriate for the cube being created.
■ Select New Dimensions: The wizard presents a list of dimensions and associated
tables. Deselect any dimensions that are not wanted or tables that should not be
included in that dimension.
■ (^) Completing the Wizard: Enter a name for the new cube and optionally review the
measures and dimensions that will be created.
Upon completion of the wizard, a new cube and associated dimensions will be created.


Dimensions


Dimensions are categories used to summarize the data of interest. Dimensions created by a
wizard generally prove to be good fi rst drafts but need refi nement.

Chapter 51 presents background on Business Intelligence and data warehousing concepts.

Creating a Dimension
Dimensions contain attributes, which are the way data in the cube will be sliced. For
instance, a cube may contain a measure group of sales that stores the product sold, the sale
amount, and the date of the sale. A user may want to see sales totals by year and would
slice the data by calendar year, an attribute or characteristic of the date dimension.

In addition to storing attributes, a dimension must have exactly one key column. The key
column denotes how to uniquely identify each record. A date dimension may have quarters,

c53.indd 1204c53.indd 1204 7/31/2012 10:30:23 AM7/31/2012 10:30:23 AM


http://www.it-ebooks.info
Free download pdf