DOWNLOAD THE CODE:
Download the Code 22394.zip

Give mobile users access to the data they need

A common shortcoming of analytic applications is that they can't support mobile or disconnected users. Because analytic applications are complex, developers move more application functionality to Web browser—based UIs, which use dynamic HTML (DHTML) and JScript to minimize the amount of application code that workstations download. Unfortunately, disconnected workstations (e.g., laptops) can't run this limited code without a network connection. Because I'm one of those mobile users, I appreciate applications that I can use whether or not I'm connected. The number of users like me is growing; more workers in the enterprise are using laptops instead of desktop computers. Managers, especially, rely on mobility, and they're heavy consumers of analytic applications. To support disconnected users, developers need to enable users to take part or all of an application with them.

I don't have a solution that will make your fancy DHTML Web application run well on a disconnected laptop. But I can tell you about a new feature in SQL Server 2000 Analysis Services that makes supporting disconnected users easier: local-cube Data Definition Language. DDL provides a simple way to create local-cube files in Analysis Services through MDX. These local-cube files let you put part or all of the data from a server-based cube onto a laptop. You can then use the local-cube file to perform the same analysis that you could if you were connected to the OLAP server on a network. To create a local cube without this new MDX syntax, you must construct a verbose SQL-like statement and pass it to ADO through a connection string.

Local-cube DDL is superior to the old connection-string method for three reasons. First, the shortcuts in the DDL syntax make using it simpler than repeating all the details of the server-based cube to create a local cube with the same dimension structures. Second, most OLAP applications don't give users the ability to customize the connection string to the required degree, so developers created custom applications to provide the CREATECUBE functionality. Third, a variation of the new DDL can create session-scoped temporary cubes. (I explore session-scoped cubes in a moment.)

Creating a Local Cube Simply
Let's compare the syntax you use to create local-cube files through an ADO MD connection string with the syntax you use to make the same cube in the local-cube DDL. In this example, we create a local cube from the FoodMart 2000 Sales cube with the full Customers, Product, and Time dimensions and the Unit Sales measure. Listing 1, page 65, shows the ADO MD connection-string syntax you use to create the cube. The syntax is much like SQL syntax. A CREATECUBE statement defines the structure (as the CREATE TABLE statement does in SQL). Then, an INSERTINTO statement uses SELECT to fill the cube. Because the CREATECUBE statement is independent of the INSERTINTO statement, CREATECUBE contains no information about where the data will come from. Therefore, you can't copy the structure of the source cube. You must include all the details—level names, their types, and information about the measure's aggregation method.

Listing 2 shows how to use the new local-cube DDL to create an equivalent local cube. DDL requires just one statement to perform the whole operation. Because the statement specifies both the source and destination cubes, Analysis Services can determine the structure of the source cube's dimension and replicate that structure in the new local-cube file. This DDL statement is much easier to create than the old connection-string commands. Also, because you can execute this DDL statement in an existing connection, you can create your own local-cube file by simply typing the statement that Listing 2 shows into the MDX Sample Application that Analysis Services includes, then executing the statement.

When users give presentations, travel to remote offices or customer sites, or take work home from the office, they rarely need all the data in a cube, but the information they need can vary from user to user. Therefore, the local-cube DDL lets you subset the cube either by dimension or by slicing by a member. The example in Listing 2 shows how you can subset the cube by dimension. The second type of cube subset, slicing by a member, lets you choose information appropriate to a specific user's needs. For example, a regional sales manager might need only the portion of the cube that includes sales for her region.

   Prev. page   [1] 2     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

Your Comments (required):Very easy, clear, usefull; what I was looking for!

Roberto Calanca