Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
» Sitemap
Free Newsletters:

By submitting your information, you agree that databasejournal.com may send you databasejournal offers via email, phone and text message, as well as email offers about other products and services that databasejournal believes may be of interest to you. databasejournal will process your information in accordance with the Quinstreet Privacy Policy.

News Via RSS Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Jun 21, 2004

Introduction to MSSQL Server 2000 Analysis Services: Another Approach to Local Cube Design and Creation - Page 7

By William Pearson

With another selection in this dialog, we decide what kind of cube we want to create. Our choice here depends on several factors in our operating environment, including the amount of data our cube will contain; the type and complexity of reports we plan to create based upon our cube; and the memory, disk space and other resources on our systems (as well as those of the systems upon which the information consumers will be interacting with our cube).  Experience and planning will be our best guides to selecting the correct options, as we develop larger and more complex cubes for various organizational needs. Experience and planning will be our best guides as we develop larger and more complex cubes for various organizational needs.

The Save a cube file containing all data for the cube option creates a separate cube file on our PCs, retrieving all the data we have designated within our cube design, and storing it in this file. This selection is not appropriate in all situations, but might represent a good choice when:

  • We are constructing and generating a cube for frequently changing interactive reports;
  • The amount of disk space used by the file is not a limiting concern;
  • We want to store the cube on a network server as a standalone source that information consumers can access to create their own reports (an alternative, but often innovative, use for a local cube. Local cubes are great to use for training sources for fledgling report writers, as well.)

A local cube file can act as an intermediate source of data from the original relational database that excludes source data to which we might want to prevent access. A local cube file can also provide a snapshot of some or all of the source database to facilitate offline access and analysis, either for a consumer community (for instance, on an isolated, separate network), or for a sole remote consumer or consumers.

As in most scenarios of variable processing and storage scenarios, resource and speed tradeoffs are a factor to consider. With the Save a cube file containing all data for the cube option, we can expect more time and resources to be necessary for the initial creation of the cube; but read operations, such as opening and modifying reports, will likely be faster (although cube size is a factor to consider in read speeds). In addition, the fact that the cubes we generate are self-contained is often a deciding factor for the selection of the Save a cube file containing all data for the cube option.

The sheer amount of the data we include in the cube, together with the number of dimensions and levels we attach to the model, are key factors in predicting ultimate cube size. Flatter hierarchies and filtered data selections are considerations in reducing cube size, as are other Cube Type options that can be selected on the Step 3 of 3 dialog. A close study of the options and prudent design of the cube, combined with testing in an appropriate development environment (and well facilitated by the ability to create and modify local cubes quickly and easily, as I have emphasized) will contribute heavily to efficient cube generation, delivery and overall operations.

For more information regarding the details of the various choices that appear on this dialog, as well as optimization techniques for cube building in general, see the Books Online that are installed with the Typical MSSQL Server 2000 / Analysis Services installation, or which can be accessed on the installation CDs or on the Microsoft MSSQL Server website.

26.  Click Finish.

The Save As dialog appears, prompting us to name the definition file of the OLAP query (.oqy).

27.  Name the file LocalCube_Relational, and navigate to store it in a convenient place. (I again left mine at default.)

The Save As dialog appears as shown below.

Illustration 15: The Save As Dialog with Location Indicated for the New Definition File

MS Query prompts us to save the cube definition (.oqy) file, which is separate from the cube file that we create to store data. We can reuse the .oqy file in Excel for report creation or for other possible purposes later. When we chose the Save a cube file containing all data for the cube option at the last dialog, a file with a .cub extension was "scheduled" to be created, in a location to be specified. The .cub file actually contains the data for the cube, and is not created immediately when we click Finish. In our case, it is created when we save the cube definition as a file; once MS Query creates the OLAP query file, it hands off instructions to the PivotTable Service to use the newly saved definition to kick off creation of the local cube.

To modify our initial cube design, we have only to open the .oqy file to initialize the OLAP Cube Wizard once more. For more details regarding the .oqy files, see the MS Query Online Help.

28.  Click the Save button on the Save As dialog.

The .oqy file is quickly saved, and the Creating Offline Cube dialog appears, and remains until the cube is created, confirming that the build is taking place.

We are returned to Microsoft Excel, where we are greeted by the PivotTable and PivotChart Wizard - Step 3 0f 3 dialog.

29.  Click the top, left corner cell (Sheet1!$A$1) to place the new PivotTable on the current worksheet.

30.  Click Finish.

We see the standard PivotTable "map" appear, signaling that 1) we have a connection to the new cube and 2) that the cube is ready to be reported upon using standard PivotTable report procedures (see Reporting Options for Analysis Services Cubes: MS FrontPage 2002 for a step-by-step tutorial on PivotTable report navigation and use). The PivotTable report appears as shown in Illustration 16 below.

Illustration 16: The PivotTable Report - Ready for Reporting Action

The cube is now ready for reporting, and, from the perspective of a reporting application, is in many ways identical to a server-generated cube.

31.  Save the Excel worksheet as desired.

Keep in mind that we can call Microsoft Query at any time to rapidly edit the initial .oqy file, so as to make modifications based upon the results obtained in reporting efforts, or as new requirements arise from the information consumers who test the new cube design in development. A quick rebuild of the cube will implant any changes, giving us the opportunity to immediately test for desired results again.

Summary ...

In this article, we continued our exploration of local cubes, using MS Office components to access the realm of OLAP data source design and creation. We created a local cube from an existing Excel PivotTable report in our previous session, and then we performed a step-by-step exploration of a more design-oriented route in this lesson, using the OLAP Cube Wizard, to accomplish cube creation in a more flexible manner.

We drilled into many practical aspects of putting the functionality to work immediately, discussing ways that local (or offline) cubes can meet the business requirements of distributed information consumers ( a topic we first introduced in the previous article, Introduction to Local Cubes), and can add value to the organization in general. Throughout our hands-on practice session of creating a local cube from a relational data source, we discussed the advantages of using our local cube design process as a flexible and portable means of rapidly prototyping enterprise OLAP data sources.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

MS SQL Archives

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.