Top Banner
Chapter 13 - OLAP Services Online analytical processing (OLAP) is an increasingly popular technology that can improve business analysis dramatically, but one that has been characterized historically by expensive tools, difficult implementation, and inflexible deployment. Microsoft has addressed the OLAP problem and created a solution that makes multidimensional analysis accessible to a broader audience and potentially at a significantly lower cost of ownership. What is OLAP Services? Microsoft SQL Server OLAP Services is a fully featured OLAP capability that is a component of Microsoft SQL Server version 7.0. OLAP Services includes a middle-tier server that allows users to perform sophisticated analyses on large volumes of data, with exceptional performance. A second feature of OLAP Services is a client cache and calculation engine called PivotTable Service, which helps improve performance and reduce network traffic. PivotTable Service allows users to conduct analyses while disconnected from the corporate network. OLAP is a key component in the data warehousing process, and OLAP Services provides essential functionality for a wide array of applications ranging from corporate reporting to advanced decision support. The inclusion of OLAP functionality within SQL Server can help make multidimensional analysis more affordable and bring the benefits of OLAP to a wider audience. This includes not only smaller organizations, but also groups and individuals within larger corporations that have been excluded from the OLAP industry by the cost and complexity of today's products. Coupled with a wide variety of tools and applications that support OLAP applications through the Microsoft OLE DB for OLAP interface, OLAP Services can increase access to sophisticated analytical tools and can reduce the costs of data warehousing. Rationale for OLAP Systems Historically, the bulk of investment in corporate computing has been in systems that generate or capture data, such as accounting, order processing, manufacturing, and customer information. Increasingly, organizations are investing in applications and technologies that deliver additional value from this collected data. Data warehousing is the process of collecting, cleansing, and sifting data from a variety of operational systems and making the resultant information available to a wide audience of end users for analysis and reporting. Data warehouse and data mart are terms used to describe these nonvolatile stores of cleansed and summarized information that are available for browsing by users. Microsoft Data Warehousing Strategy Several years ago, Microsoft undertook a pair of initiatives with the overall goal of expanding the availability of data warehousing and decision support capabilities in the business world. The two initiatives are the Microsoft Data Warehousing Framework, which is a roadmap for Microsoft product development, and the Microsoft Alliance for Data Warehousing, which is a coalition of industry businesses committed to the Microsoft platform and the Data Warehousing Framework for development and marketing purposes. The initiatives were based on a central strategy of Microsoft Corporation contributing to the data warehousing process by: Lowering the costs of acquisition, implementation, and maintenance. Redefining scalability to serve not only the large systems, but also to serve the individual user.
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 90610940-Chapter-13-OLAP

Chapter 13 - OLAP Services Online analytical processing (OLAP) is an increasingly popular technology that can improve business analysis dramatically, but one that has been characterized historically by expensive tools, difficult implementation, and inflexible deployment. Microsoft has addressed the OLAP problem and created a solution that makes multidimensional analysis accessible to a broader audience and potentially at a significantly lower cost of ownership.

What is OLAP Services?

Microsoft SQL Server OLAP Services is a fully featured OLAP capability that is a component of Microsoft SQL Server version 7.0. OLAP Services includes a middle-tier server that allows users to perform sophisticated analyses on large volumes of data, with exceptional performance. A second feature of OLAP Services is a client cache and calculation engine called PivotTable Service, which helps improve performance and reduce network traffic. PivotTable Service allows users to conduct analyses while disconnected from the corporate network. OLAP is a key component in the data warehousing process, and OLAP Services provides essential functionality for a wide array of applications ranging from corporate reporting to advanced decision support. The inclusion of OLAP functionality within SQL Server can help make multidimensional analysis more affordable and bring the benefits of OLAP to a wider audience. This includes not only smaller organizations, but also groups and individuals within larger corporations that have been excluded from the OLAP industry by the cost and complexity of today's products. Coupled with a wide variety of tools and applications that support OLAP applications through the Microsoft OLE DB for OLAP interface, OLAP Services can increase access to sophisticated analytical tools and can reduce the costs of data warehousing.

Rationale for OLAP Systems

Historically, the bulk of investment in corporate computing has been in systems that generate or capture data, such as accounting, order processing, manufacturing, and customer information. Increasingly, organizations are investing in applications and technologies that deliver additional value from this collected data. Data warehousing is the process of collecting, cleansing, and sifting data from a variety of operational systems and making the resultant information available to a wide audience of end users for analysis and reporting. Data warehouse and data mart are terms used to describe these nonvolatile stores of cleansed and summarized information that are available for browsing by users.

Microsoft Data Warehousing Strategy

Several years ago, Microsoft undertook a pair of initiatives with the overall goal of expanding the availability of data warehousing and decision support capabilities in the business world. The two initiatives are the Microsoft Data Warehousing Framework, which is a roadmap for Microsoft product development, and the Microsoft Alliance for Data Warehousing, which is a coalition of industry businesses committed to the Microsoft platform and the Data Warehousing Framework for development and marketing purposes. The initiatives were based on a central strategy of Microsoft Corporation contributing to the data warehousing process by:

Lowering the costs of acquisition, implementation, and maintenance. 

Redefining scalability to serve not only the large systems, but also to serve the individual user. 

Increasing the integration tools provided by third-party vendors. 

Microsoft Data Warehousing Framework

The Data Warehousing Framework is an open architecture that describes mechanisms for sharing data and metadata in the construction and management of data warehouses and data marts. The essential technologies underlying the Data Warehousing Framework are the OLE DB data interfaces and the instance of Microsoft Repository running on SQL Server. Repository is a database that stores descriptive information about software components and their relationships (metadata). Metadata models have been defined in Repository for database schemas, data transformations, and OLAP database schemas.

Page 2: 90610940-Chapter-13-OLAP

The Data Warehousing Framework components represent integral steps in the data warehousing process, some of which are being delivered by Microsoft but that can be extended easily by Microsoft customers and third-party businesses using alternative technology. SQL Server 7.0 provides many of the basic components required for building and maintaining a data warehouse: database design with a graphical schema designer; high-capacity data storage; data transformation capabilities through Data Transformation Services (DTS); OLAP capabilities through OLAP Services; and so on.

For more information about the Data Warehousing Framework, see "Data Warehousing Framework" earlier in this volume.

Data Complexity

Although the data warehousing process prepares data for end user consumption, most information in a relational data warehouse is not easily browsed. Data structures are often difficult for the end user to comprehend and questions such as "Who are the top sales people in each region for the last year by month?" are complex when expressed in SQL. Some of these challenges can be addressed with advanced query tools, which hide the database complexity from the end user, but for the larger class of applications in which the end user is viewing multidimensional data, Microsoft believes the optimal solution is OLAP technology. All organizations, regardless of size, must manage complex multidimensional data. Even the smallest organization may need to track sales by product, salesperson, geography, customer, and time. Organizations have sought tools to access, navigate, and analyze multidimensional data in an easy, natural way. OLAP is not a new concept, but the OLAP name has been given to this technology only recently. In 1993, Dr. E. F. Codd, the database researcher and inventor of the relational database model, coined the term in his paper, "Providing OLAP to User Analysis: An IT Mandate," wherein he laid out 12 rules that defined the characteristics of OLAP applications. Nigel Pendse and Richard Creeth of the OLAP Report (http://www.olapreport.com/fasmi.htm) later refined his definition with what is called the FASMI test. This test states that OLAP applications should deliver fast analysis of shared multidimensional information following these guidelines: Fast Delivers information to the user at a fairly constant rate. Most queries should be delivered to the user in five seconds or less.Analysis Performs basic numeric and statistical analysis of the data, predefined by an application developer or defined ad hoc by the user.Shared

Page 3: 90610940-Chapter-13-OLAP

Implements the security requirements necessary for sharing potentially confidential data across a large user population.Multidimensional Is the essential characteristic of OLAP.Information Accesses all the data and information necessary and relevant for the application, wherever it may reside and not limited by volume.

Value to Organizations

OLAP provides organizations with a means of accessing, viewing, and analyzing data with high flexibility and performance. First and foremost, OLAP presents data to end users through a natural and intuitive data model. Using this navigational style, end users can view and understand the information in their data warehouses more effectively, thereby allowing organizations to better recognize the value of their data. Second, OLAP accelerates the delivery of information to end users viewing these multidimensional structures by preparing some computed values in the data in advance, rather than at execution time. The combination of easy navigation and fast performance allows end users to view and analyze data more quickly and efficiently than is possible with relational database technology only. The end result is more time spent analyzing data and less time analyzing databases.

OLAP Data Model

In an OLAP data model, information is viewed conceptually as cubes that consist of descriptive categories (dimensions) and quantitative values (measures). The multidimensional data model makes it easy for users to formulate complex queries, arrange data on a report, switch from summary to detail data, and filter or slice data into meaningful subsets. For example, typical dimensions in a cube containing sales information include time, geography, product, channel, organization, and scenario (budget or actual). Typical measures include dollar sales, unit sales, inventory, headcount, income, and expense.

 

Within each dimension of an OLAP data model, data can be organized into a hierarchy that represents levels of detail on the data. For example, within the time dimension, you may have the levels years, months, and days; similarly, within the geography dimension, you may have the levels country, region, state/province, and city. A particular instance of the OLAP data model would have the specific values for each level in the hierarchy. A user viewing OLAP data can move up or down between levels to view information that is either more or less detailed.

Aggregation and Storage Models

Cubes, dimensions, hierarchies, and measures are the essence of the multidimensional navigation of OLAP. By describing and presenting data in this fashion, users can navigate a complex set of data intuitively. However, describing the data model intuitively does little to speed delivery of the information to the user.

Page 4: 90610940-Chapter-13-OLAP

A key tenet of OLAP is that users should see consistent response times for each view, or slice, of the data they request. Because data is usually collected at the detail level only, the information summary usually is computed in advance. These precomputed values, or aggregations, are the basis of the OLAP performance gains. In the early days of OLAP technology, most vendors assumed that the only possible solution for OLAP applications was a specialized, nonrelational storage model. Later, other vendors discovered that through the use of database structures (star and snowflake schemas), indexing, and storage of aggregates, relational database management systems (RDBMS) could be used for OLAP. These vendors called their technology Relational OLAP (ROLAP). The earlier OLAP vendors then adopted the term multidimensional OLAP (MOLAP). MOLAP implementations usually outperform ROLAP technology, but have problems with scalability. On the other hand, ROLAP implementations are more scalable and are often attractive to customers because they leverage investments in existing relational database technology. A recent development has been a hybrid OLAP (HOLAP) solution, which combines the ROLAP and MOLAP architectures to yield a solution with the best features of both: superior performance and extensive scalability. One approach to HOLAP maintains detail records (the largest volumes) in the relational database, while maintaining aggregations in a separate, MOLAP store. Top Of Page

OLAP Services Architecture

Microsoft SQL Server OLAP Services has been designed from the ground up to help minimize the most significant ownership costs of building and maintaining OLAP applications. OLAP Services consists of both server and client (middle-tier) software components.

 

On the server side, OLAP Services OLAP server operates as a Microsoft Windows NT service and provides the core computational functionality. Programmatic access to administrative functions in the OLAP server is through an object model called Decision Support Objects (DSO), which is documented by Microsoft. OLAP Manager, the built-in administrative user interface for OLAP Services, also is developed on DSO and provides a rich user experience without the need for programming. OLAP Manager, which can execute on a computer separate from the OLAP server, allows the database administrator to design OLAP data models, access information in RDBMS stores, design aggregations, and populate OLAP data stores, among other functions. The OLAP metadata definitions are stored in a private repository, but can be exported to Repository with the OLAP Open Information Model (OIM) by using a simple utility. OLAP Services can access source data in any supported OLE DB data provider, which includes not only SQL Server but also a large number of desktop and server databases, including Microsoft Access, Microsoft FoxPro, Oracle,

Page 5: 90610940-Chapter-13-OLAP

Sybase, and Informix. Any database source that provides an Open Database Connectivity (ODBC) interface is also accessible through a facility in OLE DB that wraps ODBC drivers and exposes them as if they were native OLE DB interfaces. These data sources can also reside on platforms other than the Windows NT operating system, for example, UNIX or mainframe systems and databases like IBM DB2 or Teradata. Through the multiplatform capabilities of OLE DB, data can be accessed from a wide variety of systems as if they were local to the OLAP Services server. On the client side, OLAP Services includes a component called PivotTable Service. PivotTable Service is the facility that connects OLAP client applications to the OLAP Services server. All access to data managed by OLAP Services, by custom programs or client tools, is through the OLE DB for OLAP interface provided by PivotTable Service. Both the client and server components of OLAP Services are extensible in functionality. Customer sites, independent software vendors (ISVs), and consultants all can extend the calculation, data management, or application functionality using the well-documented features in DSO. With this built-in extensibility, customers can be assured that OLAP Services will have the functionality necessary to address their application needs.

Challenges of OLAP Implementation

There are several challenges that must be overcome in the implementation of OLAP: Building the OLAP data model 

Performance and scalability 

Building the OLAP Data Model

A fundamental challenge in OLAP implementation is mapping the initial database schema to the multidimensional model. This requires a significant programming effort with many of the products on the market today. In the evolution of OLAP products, OLAP database design has become a specialized and arcane process, intricately linked to the specific OLAP technology being deployed. Consequently, OLAP database developers are specialized, which has led to high costs in developing applications, concentrated at the data design stage. In most OLAP implementations, it is assumed that the data has been prepared for analysis through data warehousing, whereby information has been extracted from operational systems, cleansed, validated, and summarized prior to incorporation into an OLAP application. This is a vital step in the process, which ensures that the data being viewed by the OLAP user is correct, consistent, and matches organizational definitions for the data. Increasingly, information in a data warehouse is organized in star (or snowflake) schemas, which simplify user understanding of the data, maximize performance for decision support applications, and require less storage for large databases. The following illustration is an example of a star schema. In this database schema, a central fact table is linked to related dimension tables.

Page 6: 90610940-Chapter-13-OLAP

A star (snowflake) schema is a relational approximation of the OLAP data model and can be an excellent starting point for building OLAP cube definitions. Few OLAP products, however, have taken advantage of this trend. Generally, they have not provided easy tools to map a star schema to an OLAP model, and as a result keep the cost of building OLAP models extremely high and the development time unnecessarily long.

Intuitive User Interfaces

One of the key differences in Microsoft SQL Server OLAP Services version 7.0 is the OLAP Manager user interface, which has been created with the infrequent OLAP database administrator in mind. The OLAP Manager is delivered as a snap-in to the Microsoft Management Console (MMC), and it shares the same administrative user interface as the entire Microsoft BackOffice family of products. The obvious benefit is that the OLAP database administrator is better able to translate skills from SQL Server and other Microsoft products. More value becomes apparent when the power and flexibility of MMC are understood. OLAP Services includes a full range of taskpads that guide the novice or infrequent user through common tasks. OLAP Services also includes a full tutorial on OLAP concepts and a step-by-step guide to building an OLAP cube. A full complement of wizards is available for automating the most common activities, such as creating a dimension definition. Furthermore, OLAP Services is optimized for developing data warehouses in which star or snowflake schemas have been designed. The Cube Wizard is especially suited to these prebuilt schemas, and translation to the multidimensional model is extremely rapid. OLAP Services can easily accommodate other source schemas should they be encountered.

Page 7: 90610940-Chapter-13-OLAP

To ensure successful interpretation of the OLAP Services user interface concepts, Microsoft conducted usability tests. Finally, large-scale beta testing has provided broad exposure and customer input to OLAP Services. As a result of the energy spent on the database administrator requirements, most users are able to build their first cube in less than 30 minutes.

Managing Data Explosion with Aggregation

As noted earlier, precomputing aggregations is a key performance strategy for most OLAP products. However, preaggregation comes at a significant cost: The number of aggregations can easily outstrip the number of initial detail points, and the volume of data stored expands dramatically. The number of aggregations in an OLAP model is a function of the number of dimensions, the number of levels in the hierarchies, and the parent-child ratios. For more information, see the OLAP Report at http://www.olapreport.com. Real-world examples of the effects of this data explosion abound. A recently published standard benchmark test of another OLAP product resulted in a data explosion factor of 240, requiring 2.4 gigabytes (GB) of storage to manage 10 megabytes (MB) of input data. Providing adequate disk storage to handle the huge expansion in data is a significant cost of large-scale OLAP implementations, and it creates distinct limits on the ability of an organization to analyze all the desired source-level data.

 

Because of data explosion, OLAP applications can suffer even more when the source or detail data is distributed sparsely throughout the multidimensional cube. Missing or invalid data values create sparsity in the OLAP data model. In the worst case, an OLAP product would nonetheless save an empty value. For example, a company may not sell all products in all regions, so no values would appear at the intersection where products are not sold in a particular region. Reducing data sparsity is a challenge that has been met with varying degrees of success by different OLAP vendors. The worst implementation results in databases that stored empty values, thus having low density and wasting space and resources. OLAP Services does not store empty values, and as a result, even sparsely populated cubes do not balloon in size. While this issue is frequently highlighted by some OLAP vendors as a deciding factor in OLAP architectures, the differences between vendor implementations of sparsity management is minor compared to the more significant data explosion caused by precalculating too many aggregates.

Flexible Storage Choices

Microsoft believes OLAP Services leads the market in offering a flexible solution that allows the OLAP database administrator to decide which storage model is most appropriate. OLAP Services supports a full MOLAP implementation, full ROLAP implementation, or a HOLAP solution. For example, a database administrator may opt to

Page 8: 90610940-Chapter-13-OLAP

put frequently accessed data in MOLAP and historical data, which has more scalability problems, in ROLAP. However, the underlying data model is completely invisible to the client application, and its user perceives only cubes. Whether one chooses to implement a MOLAP, ROLAP, or HOLAP data model, the integration of OLAP Services with relational databases is superior. OLAP Services maintains strong links between the source data, the OLAP multidimensional metadata, and the aggregations themselves by tying the graphical user interface design tools and wizards directly to OLE DB. When implementing ROLAP data models, OLAP Services defines, populates, and maintains all of the relational database structures. This frees the developer from having to perform these tasks, or worse, from having to manage complex queries across multiple tables and servers.

Intelligent Preaggregation

Also, OLAP Services has minimized a fundamental problem of OLAP technology: data explosion caused by excessive preaggregation. As described earlier, OLAP data explosion is the result of multidimensional preaggregation. In traditional OLAP systems, data that has not been preaggregated is not available for reporting and analysis purposes unless calculated at run time. By precalculating and storing all possible combinations of aggregates (for example, the sum of all products and product levels across all time periods, across all organizations, across all distribution channels, and so on), traditional OLAP products create a massive data explosion. In contrast to the approach of calculating all possible aggregations, OLAP Services determines which aggregations provide the greatest performance improvements, but also allows the OLAP database administrator to make a trade-off between system speed and the disk space required to manage aggregations through the Storage Design Wizard. (See the following illustration.) If the developer were to precalculate all aggregations, disk space requirements would be maximized (hence the data explosion syndrome). On the other hand, if the developer were to precalculate nothing, disk requirements would be zero, but performance would not be improved.

In most cases, OLAP Services can gain about 80 percent improvement in query performance without excessive precomputation of aggregations (the exponential explosion of data typically occurs during the last 20 percent of aggregations). OLAP Services analyzes the OLAP metadata model and heuristically determines the optimum set of aggregations from which all other aggregations can be derived. The result is that OLAP Services derives nonaggregated data from a few existing aggregate values rather than having to scan the entire data warehouse. This strategy of partial preaggregation, however, is only the starting point.

Page 9: 90610940-Chapter-13-OLAP

Although the OLAP Services heuristics are excellent, they are based on mathematical models that may or may not correspond to actual usage patterns. To optimize performance according to actual usage patterns, OLAP Services optionally logs queries sent to the server. These logs then can be used to fine-tune the set of aggregations that OLAP Services maintains. For example, the Usage-Based Optimization Wizard allows the database administrator to tell OLAP Services to create a new set of aggregations for all queries that take longer than n seconds to answer (where n might be 10 seconds or more). Disk space can be purchased whereas time cannot. If the extraction time of critical information outweighs the cost of purchasing more disk space, the solution is apparent. The OLAP Services solution for data explosion reduces the time required to process initial loads and incremental updates, as well as minimizes the amount of disk space necessary. If an application begins with a 10-GB data warehouse and generates 10 GB of aggregations, then the processing time required is a fraction of that required to process the fully exploded set of aggregations. OLAP Services also has taken an innovative approach to data sparsity. Although the details of the internal implementation are proprietary, the net result is that both MOLAP and ROLAP implementations manage storage requirements extremely well, often resulting in databases with smaller OLAP storage needs than the original detail data. Virtual cubes can be used whenever the user wants to view joined information from two dissimilar cubes that share as few as one common dimension. Similar in concept to a relational view, virtual cubes are two or more cubes linked at query time along one or more common dimensions. One benefit of virtual cubes applies to situations in which data sparsity is a significant problem. For example, a cube that contains measures for sales by unit and selling price could also have a measure for list price to compute discounts, but the list price value would be repeated many times. By building a list price cube that is joined in a virtual cube with the sales by unit and selling price information, the database administrator can eliminate much of the data redundancy. The ability to create virtual cubes means that many unnecessary values can be eliminated from the OLAP data storage altogether.

Performance and Scalability

The specific performance metrics of an OLAP application are a function of several factors, including database size, hardware computing power, and disk space allocated to preaggregated data. However, in real-world implementations, OLAP Services–based applications respond to most queries in less than 5 seconds and to nearly all queries within 10 seconds. The OLAP Services implementation of partitioned cubes makes the technology highly scalable. A partitioned cube allows one logical cube of data to be spread over multiple physical cubes and even separate physical servers. In response to a user query, OLAP Services distributes the query among the partitioned servers, allowing the data to be retrieved in parallel. For example, consider the case of an application tracking telephone calls for 10 geographic regions, where one would expect several million calls per day. For the purpose of analysis, one could partition the data among 10 servers, each containing the data for a particular region. From the user perspective, however, there is simply one logical cube of data. In response to user requests for this information, OLAP Services seamlessly transforms the queries as appropriate for each of the 10 servers and returns a single result set to the user. Each of the 10 databases is also available for separate access by analysts seeking information for that particular region.

Delivering OLAP Information to the User

Historically, because OLAP server technology has been tightly linked to proprietary client technology, customers have had little choice in their selection of mixed, best-of-breed products. This has led to high implementation costs and often inadequate choices for applications that require both client/server and Web-based OLAP information delivery. As was recognized years ago in the relational database industry, a common interface is necessary to promote openness in the selection of applications and databases. The industry standard became ODBC.

Industry Standards

The issue of openness in OLAP tools was first taken up in 1996, when a vendor consortium called the OLAP Council announced an interoperability standard, multidimensional application programming interface (MDAPI), which was meant to open the marketplace to greater vendor participation. In spite of much customer anticipation, the vendor community, including the members of the OLAP Council, generally shunned MDAPI. Recognizing the need for a unifying standard that leveraged existing customer investments, Microsoft extended the definition of the existing OLE DB data access API to include multidimensional capabilities. In one year, Microsoft published two drafts of the API, sought feedback from vendors and the public, and ultimately delivered a final version in February 1998 that was endorsed by 18 vendors at beta release.

Page 10: 90610940-Chapter-13-OLAP

Disconnected and Web-based Delivery

Individuals often need to analyze data multidimensionally while they are disconnected from the corporate network, such as when traveling with a laptop computer. Disconnected users typically want to view and analyze small slices of their entire cube; for example, a sales manager may want to view a revenue summary for a particular region while visiting a regional office. The need is so common that desktop OLAP (DOLAP), which does not require a shared server for multidimensional data access, was created. Most OLAP server technologies do not provide transparent creation of DOLAP cubes. As a result, this step has been left as yet another development-intensive effort or relegated to OLAP client tools that have added functionality to support desktop usage. Overall, this has increased the cost and complexity of delivering applications that require both connected and disconnected clients. A popular viewing tool for any type of information, especially multidimensional information, is a Web browser. A key means of reducing the cost per user in large-scale OLAP applications, Web browsers open the world of multidimensional access to a wider audience. At present, there are some good products and tools for delivering OLAP data over an intranet, but there is no easy mechanism for an application developer to create custom OLAP viewing tools.

PivotTable Service

The OLAP Services server caches user queries and metadata as well as data. Cached query definitions and metadata make it possible for OLAP Services to answer new queries by calculating previously cached data rather than accessing the disk. For example, one user asks for sales data for January, February, and March. Another user asks for sales data for the first quarter. OLAP Services can summarize January through March from random access memory (RAM) faster than it can fetch the first-quarter data from disk. OLAP Services is unique in that it provides much of the same functionality on the client. Every client connects to OLAP Services servers by using PivotTable Service. PivotTable Service acts as a driver to manage the connection between the client and server. PivotTable Service shares much of the same code as the OLAP Services server, bringing the server's multidimensional calculation engine, caching features, and query management directly to the client. The result is an innovative client/server, data-management model that optimizes performance and minimizes network traffic. This comes at a very small computing cost: The disk space required for PivotTable Service is approximately 2 MB, and the memory requirements are only 500 KB in addition to the cached data.

 

The OLAP Services intelligent client/server architecture is capable of determining how to answer a user request as quickly as possible, while eliminating redundant network traffic. The key to this architecture is shared metadata between client and server. When a user requests information from the server, both data and metadata (definitions of the cube structure) are downloaded to the client. Having the cube metadata present on the client allows PivotTable Service to resolve which requests need to be returned to the server for resolution. For example, recall the three-month sales data scenario. Assume that both the OLAP Services server and the client application have just been started. When the user asks for sales data for January, February, and March, the data will be cached on both the server and the client. If the user then asks for data for the first quarter, PivotTable Service will derive the results locally (at the client) without sending the query to the server. If the user subsequently asks to see data from the first quarter of this year compared to that of last year, PivotTable Service has the intelligence to access the server for last year's data only.

Page 11: 90610940-Chapter-13-OLAP

PivotTable Service also provides the mechanism for disconnected usage. Portions of cubes defined and accessed from a server can be saved on the client for later access when disconnected from the network. In this way, business users can take portions of their database while travelling and still have complete analysis capabilities. In addition, PivotTable Service allows users to create simple OLAP models locally, accessing information in OLE DB compatible data sources, from flat files to desktop databases. Finally, PivotTable Service provides the connectivity for Web-based applications. While OLE DB for OLAP is a low-level programming interface, a new extension to ActiveX Data Objects (ADO) provides multidimensional data access. This extension, called ADO/MD, can be used to create ActiveX controls in the Microsoft Visual Basic development system to browse, chart, or report on data in OLAP Services from a Web page. ADO/MD is the corporate application programmer's tool for gaining access to the full functionality of OLAP Services.

Affording OLAP Tools

Typically, OLAP products can cost $50,000 to $100,000 for less than 50 users. Microsoft recognizes that OLAP is a natural extension of database technology and has included OLAP Services as a feature of SQL Server 7.0. SQL Server 7.0 includes other complementary data warehousing features:

Visual Database Tools, for creating database schemas 

Data Transformation Services (DTS), for extracting and transforming operational data into the data warehouse 

Microsoft Repository, for providing a unified metadata store built on SQL Server 

Chương 13 - Dịch vụ OLAP Phân tích xử lý trực tuyến (OLAP) là một công nghệ ngày càng phổ biến mà có thể cải thiện phân tích kinh doanh đáng kể, nhưng một trong đó đã được đặc trưng lịch sử của các công cụ đắt tiền, thực hiện khó khăn, và triển khai linh hoạt. Microsoft đã giải quyết được vấn đề OLAP và tạo ra một giải pháp mà làm cho phân tích đa chiều có thể truy cập vào một đối tượng rộng hơn và có khả năng với chi phí thấp hơn đáng kể quyền sở hữu.

Dịch vụ OLAP là gì?

Microsoft SQL Server Dịch vụ OLAP là một OLAP đầy đủ tính năng khả năng đó là một thành phần của phiên bản Microsoft SQL Server 7.0. OLAP Dịch vụ bao gồm một máy chủ trung cấp, cho phép người dùng thực hiện phân tích tinh vi về khối lượng lớn dữ liệu, với hiệu suất vượt trội. Một tính năng thứ hai của dịch vụ OLAP là một bộ nhớ cache máy khách và máy tính được gọi là dịch vụ PivotTable, giúp cải thiện hiệu suất và giảm lưu lượng mạng. PivotTable Dịch vụ cho phép người dùng tiến hành phân tích khi ngắt kết nối mạng công ty. OLAP là một thành phần quan trọng trong quá trình lưu trữ dữ liệu, và OLAP Dịch vụ cung cấp chức năng cần thiết cho một mảng rộng các ứng dụng khác nhau, từ báo cáo của công ty để hỗ trợ quyết định nâng cao. Các chức năng bao gồm của OLAP trong SQL Server có thể giúp làm cho đa chiều phân tích chi phí hợp lý và mang lại những lợi ích của OLAP cho một đối tượng rộng hơn. Điều này bao gồm không chỉ các tổ chức nhỏ hơn, nhưng cũng có các nhóm và cá nhân trong tổng công ty lớn hơn đã được loại trừ khỏi ngành công nghiệp OLAP bởi chi phí và sự phức tạp của các sản phẩm hiện nay. Cùng với một loạt các công cụ và ứng dụng hỗ trợ OLAP các ứng dụng thông qua Microsoft OLE DB cho OLAP giao diện, OLAP dịch vụ có thể tăng quyền truy cập vào công cụ phân tích tinh vi và có thể giảm chi phí lưu trữ dữ liệu.

Cơ sở cho hệ thống OLAP

Trong lịch sử, phần lớn đầu tư vào máy tính của công ty đã được trong các hệ thống tạo ra hoặc thu thập dữ liệu, chẳng hạn như kế toán, đặt hàng, sản xuất, và thông tin khách hàng. Càng ngày, các tổ chức đang đầu tư vào các ứng dụng và công nghệ đem lại giá trị bổ sung từ dữ liệu này được thu thập. Kho dữ liệu là quá trình thu thập, làm sạch, và chọn lọc dữ liệu từ nhiều hệ thống hoạt động và làm cho thông tin kết quả có sẵn cho một đối tượng rộng của người sử dụng để phân tích và báo cáo. Dữ liệu và kho dữ liệu siêu thị là những thuật ngữ dùng để mô tả các cửa hàng không bay hơi của làm sạch và thông tin tóm tắt có sẵn cho các trình duyệt của người dùng.

Page 12: 90610940-Chapter-13-OLAP

Kho dữ liệu Microsoft Chiến lược

Nhiều năm trước đây, Microsoft đã tiến hành một cặp các sáng kiến với mục tiêu tổng thể của việc mở rộng sự sẵn có của kho dữ liệu và khả năng hỗ trợ quyết định trong thế giới kinh doanh. Hai sáng kiến của Microsoft Kho dữ liệu Framework, mà là một lộ trình phát triển sản phẩm của Microsoft, và Liên minh Microsoft cho Kho dữ liệu, mà là một liên minh của các doanh nghiệp ngành công nghiệp cam kết nền tảng của Microsoft và Kho dữ liệu khung cho các mục đích phát triển và tiếp thị. Các sáng kiến dựa trên một chiến lược trung tâm của Tập đoàn Microsoft đóng góp vào kho dữ liệu quá trình bằng cách:

Giảm chi phí mua lại, thực hiện và bảo trì.

Xác định lại khả năng mở rộng để phục vụ không chỉ những hệ thống lớn, mà còn để phục vụ người dùng cá nhân.

Tăng cường các công cụ tích hợp được cung cấp bởi nhà cung cấp bên thứ ba.

Kho dữ liệu Microsoft Framework

Kho dữ liệu Framework là một kiến trúc mở mô tả cơ chế chia sẻ dữ liệu và siêu dữ liệu trong xây dựng và quản lý kho dữ liệu và dữ liệu siêu thị. Các công nghệ thiết yếu cơ bản của Kho dữ liệu Framework là OLE DB giao diện dữ liệu và ví dụ của Microsoft Repository chạy trên SQL Server. Kho lưu trữ là một cơ sở dữ liệu mô tả lưu trữ thông tin về các thành phần phần mềm và các mối quan hệ của họ (metadata). Siêu dữ liệu mô hình đã được định nghĩa trong Repository cho các lược đồ cơ sở dữ liệu, chuyển đổi dữ liệu, và các lược đồ cơ sở dữ liệu OLAP. Kho dữ liệu khung thành phần đại diện cho các bước không thể thiếu trong quá trình lưu trữ dữ liệu, một số trong đó được phân phối bởi Microsoft, nhưng có thể được mở rộng một cách dễ dàng bởi Microsoft khách hàng và bên thứ ba các doanh nghiệp sử dụng công nghệ thay thế. SQL Server 7.0 cung cấp rất nhiều các thành phần cơ bản cần thiết để xây dựng và duy trì một kho dữ liệu: cơ sở dữ liệu thiết kế với một thiết kế lược đồ đồ họa; cao năng lực lưu trữ dữ liệu, dữ liệu khả năng chuyển đổi thông qua Dịch vụ chuyển đổi dữ liệu (DTS); OLAP OLAP khả năng thông qua dịch vụ; và vv.

Để biết thêm thông tin về các kho dữ liệu Framework, thấy "Kho dữ liệu khung" trước đây về khối lượng này.

Dữ liệu phức tạp

Mặc dù quá trình lưu trữ dữ liệu chuẩn bị dữ liệu cho tiêu dùng sử dụng cuối cùng, hầu hết các thông tin trong một kho dữ liệu quan hệ là không dễ dàng duyệt.

Page 13: 90610940-Chapter-13-OLAP

Cấu trúc dữ liệu thường khó khăn cho người dùng cuối để thấu hiểu và những câu hỏi như "những người bán hàng hàng đầu là ai trong từng khu vực trong năm cuối cùng của tháng?" rất phức tạp khi thể hiện trong SQL. Một số trong những thách thức có thể được giải quyết với các công cụ nâng cao truy vấn, trong đó ẩn sự phức tạp cơ sở dữ liệu từ người dùng, nhưng đối với các lớp lớn hơn của các ứng dụng mà người sử dụng cuối cùng là xem dữ liệu đa chiều, Microsoft tin rằng các giải pháp tối ưu là công nghệ OLAP. Mọi tổ chức, bất kể kích thước, phải quản lý dữ liệu phức tạp đa chiều. Ngay cả những tổ chức nhỏ nhất có thể cần phải theo dõi doanh số bán hàng của sản phẩm, nhân viên bán hàng, địa lý, khách hàng, và thời gian. Tổ chức có các công cụ tìm kiếm để truy cập, điều hướng, và phân tích dữ liệu đa chiều một cách dễ dàng tự nhiên. OLAP không phải là một khái niệm mới, nhưng tên OLAP đã được trao cho công nghệ này chỉ mới gần đây. Năm 1993, Tiến sĩ EF Codd, các cơ sở dữ liệu nghiên cứu và phát minh ra mô hình cơ sở dữ liệu quan hệ, đặt ra thuật ngữ trong bài báo của mình, "Cung cấp OLAP tới Thành viên phân tích: Một CNTT ủy," trong đó ông đã đưa ra 12 nguyên tắc đã xác định các đặc tính của OLAP ứng dụng. Nigel Pendse và Richard Creeth của báo cáo OLAP ( http://www.olapreport.com/fasmi.htm ) sau đó tinh chế định nghĩa của ông với những gì được gọi là thử nghiệm FASMI. Tiểu bang này thử nghiệm các ứng dụng OLAP sẽ phân phối phân tích nhanh các thông tin đa chiều được chia sẻ theo các hướng dẫn sau: Nhanh Cung cấp thông tin cho người sử dụng ở mức tương đối ổn định. Hầu hết các truy vấn sẽ được gửi đến những người sử dụng trong năm giây hoặc ít hơn. Phân tích Thực hiện cơ bản số và thống kê phân tích các dữ liệu, được xác định trước bởi một nhà phát triển ứng dụng hoặc quy định đặc biệt của người dùng. Chia sẻ Thực hiện các yêu cầu bảo mật cần thiết cho khả năng chia sẻ dữ liệu bí mật trên một dân số người dùng lớn. Đa chiều Là đặc tính thiết yếu của OLAP. Thông tin Truy cập tất cả dữ liệu và thông tin cần thiết và thích hợp cho việc áp dụng, bất cứ nơi nào nó có thể cư trú và không bị hạn chế bởi số lượng.

Giá trị cho tổ chức

OLAP cung cấp cho các tổ chức có một phương tiện truy cập, xem, và phân tích dữ liệu với tính linh hoạt cao và hiệu suất. Trước hết, OLAP trình bày dữ liệu cho người dùng cuối thông qua một mô hình dữ liệu tự nhiên và trực quan. Sử dụng phong cách này hướng, người dùng có thể xem và hiểu các thông tin trong kho dữ liệu của họ hiệu quả hơn, qua đó cho phép tổ chức tốt hơn công nhận giá trị của dữ liệu của họ. Thứ hai, OLAP tăng tốc việc cung cấp các thông tin cho người dùng cuối xem những cấu trúc đa chiều bằng cách chuẩn bị một số giá trị tính toán trong các dữ liệu trước, thay vì tại thời gian thực hiện. Sự kết hợp của điều hướng dễ dàng và hiệu quả nhanh chóng cho phép người dùng xem và phân tích dữ liệu nhanh hơn và hiệu quả hơn là có thể với công nghệ cơ sở dữ liệu quan hệ duy nhất. Kết quả cuối cùng là dành nhiều thời gian phân tích dữ liệu và cơ sở dữ liệu phân tích ít thời gian hơn.

Mô hình dữ liệu OLAP

Trong một mô hình dữ liệu OLAP, thông tin được xem khái niệm như hình khối mà bao gồm các loại mô tả (kích thước) và các giá trị định lượng (biện pháp). Các mô hình dữ liệu đa chiều giúp dễ dàng cho người dùng để xây dựng truy vấn phức tạp, sắp xếp dữ liệu trên báo cáo, chuyển từ bản tóm tắt các dữ liệu chi tiết, và dữ liệu lọc hoặc cắt thành các tập con có ý nghĩa. Ví dụ, kích thước điển hình trong một hình khối có chứa thông tin bán hàng bao gồm thời gian, địa lý, sản phẩm, kênh, tổ chức, và kịch bản (ngân sách hoặc thực tế). các biện pháp thông thường bao gồm doanh số bán hàng đồng USD, doanh số, hàng tồn kho, số lượng nhân viên, thu nhập và chi phí.

Page 14: 90610940-Chapter-13-OLAP

Trong mỗi kích thước của một mô hình dữ liệu OLAP, dữ liệu có thể được tổ chức theo một hệ thống đại diện cho mức độ chi tiết về dữ liệu. Ví dụ, trong khung thời gian, bạn có thể có các cấp độ năm, tháng, và ngày; tương tự, trong chiều hướng địa lý, bạn có thể có mức độ quốc gia, vùng, tỉnh, thành phố. Một ví dụ cụ thể của mô hình dữ liệu OLAP sẽ có các giá trị cụ thể cho từng cấp trong hệ thống. Một người sử dụng xem OLAP dữ liệu có thể di chuyển lên hoặc xuống giữa các cấp để xem thông tin đó hoặc là nhiều hơn hoặc ít chi tiết.

Mô hình tập hợp và lưu trữ

Hình khối, kích thước, phân cấp và các biện pháp là bản chất của các chuyển hướng đa chiều của OLAP. Bằng cách mô tả và trình bày dữ liệu theo cách này, người dùng có thể di chuyển một tập hợp các dữ liệu trực quan. Tuy nhiên, mô tả mô hình dữ liệu trực quan không ít đến tốc độ giao hàng các thông tin cho người dùng. Một nguyên lý chính của OLAP là người dùng sẽ thấy thời gian đáp ứng phù hợp cho từng xem, hoặc cắt, các dữ liệu họ có yêu cầu. Bởi vì dữ liệu thường được thu thập ở mức độ chi tiết chỉ, Bản tóm tắt thông tin thường được tính toán trước. Những giá trị này precomputed, hoặc aggregations, là cơ sở của công năng OLAP. Trong những ngày đầu của công nghệ OLAP, hầu hết các nhà cung cấp giả định rằng chỉ có thể có giải pháp cho các ứng dụng OLAP là một, chuyên nonrelational mô hình lưu trữ. Sau đó, nhà cung cấp khác phát hiện ra rằng thông qua việc sử dụng các cấu trúc cơ sở dữ liệu (sao và các lược đồ bông tuyết), lập chỉ mục, và lưu trữ các tập hợp, hệ thống quản lý cơ sở dữ liệu quan hệ (RDBMS) có thể được sử dụng cho OLAP. Những nhà cung cấp được gọi là công nghệ quan hệ OLAP của họ (ROLAP). Các nhà cung cấp trước đó OLAP sau đó đã thông qua đa chiều dài OLAP (MOLAP). MOLAP triển khai công nghệ ROLAP thường tốt hơn, nhưng có vấn đề với khả năng mở rộng. Mặt khác, ROLAP triển khai thực hiện có nhiều khả năng mở rộng và thường hấp dẫn cho khách hàng vì họ đầu tư tận dụng trong công nghệ hiện có cơ sở dữ liệu quan hệ. Một phát triển gần đây đã được một OLAP lai (HOLAP) giải pháp, kết hợp các ROLAP và MOLAP kiến trúc để mang lại một giải pháp với các tính năng tốt nhất của cả hai: hiệu suất cao và khả năng mở rộng lớn. Một cách tiếp cận để HOLAP duy trì hồ sơ chi tiết (lớn nhất khối lượng) trong cơ sở dữ liệu quan hệ, trong khi duy trì aggregations trong một cửa hàng riêng biệt MOLAP,.

Kiến trúc Dịch vụ OLAP

Microsoft SQL Server Dịch vụ OLAP được thiết kế từ mặt đất lên để giúp giảm thiểu chi phí sở hữu quan trọng nhất của việc xây dựng và duy trì các ứng dụng OLAP. OLAP Dịch vụ bao gồm cả máy chủ và máy khách (trung cấp) các thành phần phần mềm.

Page 15: 90610940-Chapter-13-OLAP

Về phía server, OLAP OLAP Dịch vụ máy chủ hoạt động như một dịch vụ Microsoft Windows NT và cung cấp các chức năng cốt lõi tính toán. Chương trình truy cập vào các chức năng hành chính trong các máy chủ OLAP là thông qua một mô hình đối tượng được gọi là Quyết định hỗ trợ đối tượng (DSO), là tài liệu của Microsoft. OLAP Manager, các-xây dựng trong hành chính giao diện người dùng cho dịch vụ OLAP, cũng được phát triển trên DSO và cung cấp một trải nghiệm người dùng phong phú mà không cần lập trình. OLAP Manager, có thể thực hiện trên một máy tính riêng từ máy chủ OLAP, cho phép người quản trị cơ sở dữ liệu để thiết kế mô hình dữ liệu OLAP, truy cập thông tin trong RDBMS cửa hàng, aggregations thiết kế, và cư lưu trữ dữ liệu OLAP, trong số các chức năng khác. Các định nghĩa OLAP siêu dữ liệu được lưu trữ trong một kho tư nhân, nhưng có thể được xuất khẩu sang Repository với OLAP mở thông tin Model (OIM) bằng cách sử dụng một tiện ích đơn giản. OLAP dịch vụ có thể truy cập dữ liệu mã nguồn trong bất kỳ nhà cung cấp OLE DB hỗ trợ dữ liệu, bao gồm không chỉ SQL Server mà còn số lượng lớn các máy tính để bàn và máy chủ cơ sở dữ liệu, bao gồm Microsoft Access, Microsoft FoxPro, Oracle, Sybase, và Informix. Bất cứ nguồn cung cấp một cơ sở dữ liệu Open Database Connectivity (ODBC) giao diện cũng có thể truy cập thông qua một cơ sở trong OLE DB mà kết thúc tốt đẹp ODBC driver và đưa ra cho họ như là đã được bản địa OLE DB giao diện. Những nguồn dữ liệu cũng có thể cư trú trên các nền tảng khác với hệ điều hành Windows NT, ví dụ, UNIX hay hệ thống máy tính lớn và cơ sở dữ liệu như IBM DB2 hoặc Teradata. Thông qua các khả năng đa nền của OLE DB, dữ liệu có thể được truy cập từ một loạt các hệ thống như là đã được địa phương để các máy chủ dịch vụ OLAP. Về phía khách hàng, OLAP Dịch vụ bao gồm một thành phần được gọi là dịch vụ PivotTable. Dịch vụ PivotTable là phương tiện kết nối các ứng dụng máy khách OLAP đến máy chủ dịch vụ OLAP. Tất cả các truy cập dữ liệu được quản lý bởi OLAP Dịch vụ, bởi các chương trình tùy chỉnh hoặc công cụ của khách hàng, là thông qua giao diện OLE DB cho OLAP PivotTable được cung cấp bởi Dịch vụ. Cả hai thành phần client và máy chủ của dịch vụ được mở rộng OLAP trong chức năng. Các trang web khách hàng, nhà cung cấp phần mềm độc lập (ISV), và tư vấn tất cả có thể mở rộng tính toán, quản lý dữ liệu, hoặc các chức năng ứng dụng sử dụng các tính năng cũng như các tài liệu trong DSO. Với sự tích hợp mở rộng, khách hàng có thể yên tâm rằng OLAP Dịch vụ sẽ có các chức năng cần thiết để giải quyết nhu cầu ứng dụng của họ.

Những thách thức của OLAP thực hiện

Có một số thách thức cần phải được khắc phục trong việc thực hiện OLAP: Xây dựng mô hình dữ liệu OLAP

Hiệu suất và khả năng mở rộng

Xây dựng mô hình dữ liệu OLAP

Page 16: 90610940-Chapter-13-OLAP

Một thách thức cơ bản trong thực hiện OLAP là lập bản đồ lược đồ cơ sở dữ liệu ban đầu để các mô hình đa chiều. Điều này đòi hỏi một nỗ lực lập trình có ý nghĩa với rất nhiều các sản phẩm trên thị trường hiện nay. Trong quá trình tiến hóa của các sản phẩm OLAP, OLAP cơ sở dữ liệu thiết kế đã trở thành một quy trình chuyên ngành và phức tạp, phức tạp liên quan đến công nghệ OLAP cụ thể đang được triển khai. Do đó, phát triển cơ sở dữ liệu OLAP chuyên, trong đó đã dẫn đến chi phí cao trong các ứng dụng phát triển, tập trung ở khâu thiết kế dữ liệu. Trong hầu hết các trường OLAP, người ta cho rằng dữ liệu đã được chuẩn bị để phân tích thông qua các dữ liệu lưu kho, nhờ đó mà thông tin đã được chiết xuất từ hệ thống hoạt động, làm sạch, xác nhận, và tóm tắt trước khi đưa vào một ứng dụng OLAP. Đây là một bước quan trọng trong quá trình, đảm bảo rằng các dữ liệu được xem bởi người sử dụng OLAP là chính xác, nhất quán và phù hợp với định nghĩa của tổ chức cho các dữ liệu. Càng ngày, thông tin trong một kho dữ liệu được tổ chức tại ngôi sao (hoặc bông tuyết) lược đồ, mà đơn giản hóa sự hiểu biết của người sử dụng dữ liệu, tối đa hóa hiệu suất cho các ứng dụng hỗ trợ quyết định, và yêu cầu lưu trữ ít hơn cho cơ sở dữ liệu lớn. Hình minh họa sau đây là một ví dụ của một lược đồ sao. Trong lược đồ cơ sở dữ liệu, một bảng sự trung ương có liên quan đến bảng kích thước liên quan.

Một ngôi sao (bông tuyết) lược đồ là gần đúng quan hệ của các mô hình dữ liệu OLAP và có thể là một khởi đầu tuyệt vời để xây dựng các điểm định nghĩa khối OLAP. Rất ít các sản phẩm OLAP, tuy nhiên, có sự lợi dụng xu hướng này. Nói chung, họ không cung cấp các công cụ dễ dàng để bản đồ lược đồ sao cho một mô hình OLAP, và kết quả là giữ cho chi phí xây dựng các mô hình OLAP rất cao và thời gian không cần thiết phát triển lâu dài.

Giao diện người dùng trực quan

Page 17: 90610940-Chapter-13-OLAP

Một trong những khác biệt quan trọng trong Microsoft SQL Server phiên bản OLAP Services 7.0 là giao diện người dùng OLAP Manager, mà đã được tạo ra với người quản trị cơ sở dữ liệu không thường xuyên OLAP trong tâm trí. Quản lý OLAP được phân phối như là một snap-in cho Microsoft Management Console (MMC), và nó chia sẻ cùng một giao diện người dùng chính là gia đình BackOffice toàn bộ sản phẩm Microsoft. Lợi ích rõ ràng là các quản trị cơ sở dữ liệu OLAP là tốt hơn có thể dịch các kỹ năng từ Microsoft SQL Server và các sản phẩm khác. Thêm giá trị trở nên rõ ràng khi sức mạnh và tính linh hoạt của MMC được hiểu rõ. Dịch vụ OLAP bao gồm đầy đủ các taskpads đó hướng dẫn người mới hoặc người sử dụng không thường xuyên thông qua các công việc chung. OLAP Dịch vụ cũng bao gồm một hướng dẫn đầy đủ về khái niệm và một OLAP từng bước hướng dẫn để xây dựng một khối OLAP. Một đầy đủ các trình thuật có sẵn để tự động hoá các hoạt động phổ biến nhất, chẳng hạn như tạo ra một định nghĩa kích thước. Hơn nữa, OLAP dịch vụ được tối ưu cho kho dữ liệu phát triển, trong đó ngôi sao hay các lược đồ đã được thiết kế bông tuyết. The Wizard Cube là đặc biệt phù hợp với các lược đồ dựng sẵn, và dịch thuật với mô hình đa chiều là cực kỳ nhanh chóng. Dịch vụ OLAP có thể dễ dàng đáp ứng các lược đồ mã nguồn khác mà họ cần được gặp. Để đảm bảo giải thích thành công của dịch vụ OLAP khái niệm giao diện người dùng, Microsoft đã tiến hành thử nghiệm khả năng sử dụng. Cuối cùng, quy mô lớn đã cung cấp phiên bản beta thử nghiệm tiếp xúc rộng và đầu vào khách hàng Dịch vụ OLAP. Theo kết quả của năng lượng chi cho các yêu cầu quản trị cơ sở dữ liệu, hầu hết người dùng có thể xây dựng khối lập phương đầu tiên của họ trong ít hơn 30 phút.

Quản lý dữ liệu nổ với tập hợp

Như đã nói trước đó, precomputing aggregations là một chiến lược thực hiện chính cho hầu hết các sản phẩm OLAP. Tuy nhiên, preaggregation đến với một chi phí đáng kể: Số lượng có thể dễ dàng vượt xa aggregations số điểm cụ thể ban đầu, và khối lượng dữ liệu được lưu trữ mở rộng đáng kể. Số aggregations trong một mô hình OLAP là một hàm số của kích thước, số lượng các cấp trong việc phân cấp, và tỷ lệ cha mẹ và con. Để biết thêm thông tin, xem OLAP   Báo cáo tại http://www.olapreport.com . Ví dụ thực tế về tác động của vụ nổ này có rất nhiều dữ liệu. Một tiêu chuẩn công bố gần đây điểm chuẩn thử nghiệm của một sản phẩm khác OLAP kết quả là một yếu tố nổ dữ liệu của 240, yêu cầu 2,4 gigabyte (GB) dung lượng để quản lý 10 MB (MB) của dữ liệu đầu vào. Cung cấp đĩa lưu trữ đầy đủ để xử lý việc mở rộng rất lớn trong dữ liệu là một chi phí đáng kể quy mô lớn triển khai OLAP, và nó tạo ra giới hạn khác biệt về khả năng của một tổ chức để phân tích tất cả các mong muốn nguồn cấp dữ liệu.

Bởi vì dữ liệu nổ, OLAP ứng dụng có thể bị ảnh hưởng nhiều hơn khi các nguồn dữ liệu hoặc chi tiết được phân bố rải rác trên khắp các khối đa chiều. Thiếu hoặc không hợp lệ dữ liệu giá trị tạo ra sparsity trong mô hình dữ liệu OLAP. Trong trường hợp xấu nhất, một sản phẩm OLAP dù sao sẽ tiết kiệm được một giá trị rỗng. Ví dụ, một công

Page 18: 90610940-Chapter-13-OLAP

ty không thể bán tất cả sản phẩm trong tất cả các vùng, vì vậy không có giá trị sẽ xuất hiện ở các ngã tư, nơi các sản phẩm không được bán trong một khu vực cụ thể. Giảm dữ liệu sparsity là một thách thức mà đã được đáp ứng với mức độ khác nhau của sự thành công của các nhà cung cấp khác nhau OLAP. Việc thực hiện kết quả tồi tệ nhất trong cơ sở dữ liệu được lưu trữ các giá trị rỗng, vì vậy có mật độ thấp và lãng phí không gian và nguồn lực. Dịch vụ OLAP không lưu trữ các giá trị rỗng, và kết quả là, ngay cả khối dân cư thưa thớt không bóng trong kích thước. Trong khi vấn đề này thường xuyên được đánh dấu bởi một số nhà cung cấp OLAP là một yếu tố quyết định trong OLAP kiến trúc, sự khác biệt giữa nhà cung cấp triển khai thực hiện quản lý sparsity là nhỏ so với sự bùng nổ dữ liệu quan trọng hơn gây ra bởi precalculating tập hợp quá nhiều.

Sự lựa chọn lưu trữ linh hoạt

Microsoft tin rằng OLAP Dịch vụ dẫn đầu thị trường trong việc cung cấp một giải pháp linh hoạt cho phép người quản trị cơ sở dữ liệu OLAP để quyết định mô hình lưu trữ là thích hợp nhất. OLAP Dịch vụ hỗ trợ thực hiện MOLAP đầy đủ, thực hiện ROLAP đầy đủ, hoặc một giải pháp HOLAP. Ví dụ, một quản trị cơ sở dữ liệu có thể lựa chọn để đưa dữ liệu thường xuyên truy cập vào MOLAP và dữ liệu lịch sử, trong đó có vấn đề khả năng mở rộng hơn, trong ROLAP. Tuy nhiên, mô hình dữ liệu cơ bản là hoàn toàn vô hình đối với các ứng dụng của khách hàng, và người sử dụng nhận thấy khối chỉ. Cho dù một lựa chọn để thực hiện một MOLAP, ROLAP, hoặc HOLAP mô hình dữ liệu, sự hội nhập của dịch vụ với cơ sở dữ liệu OLAP quan hệ là cấp trên. Dịch vụ OLAP duy trì liên kết chặt chẽ giữa các dữ liệu nguồn, các siêu dữ liệu OLAP đa chiều, và các aggregations mình bằng cách buộc các công cụ thiết kế đồ họa người dùng giao diện và trình thuật trực tiếp để OLE DB. Khi thực hiện các mô hình dữ liệu ROLAP, OLAP Dịch vụ định nghĩa, populates, và duy trì tất cả các cấu trúc cơ sở dữ liệu quan hệ. Điều này giải phóng nhà phát triển từ việc thực hiện các nhiệm vụ này, hoặc tệ hơn, từ việc phải quản lý các truy vấn phức tạp trên nhiều bảng và máy chủ.

Thông minh Preaggregation

Ngoài ra, OLAP dịch vụ đã giảm thiểu một vấn đề cơ bản của công nghệ OLAP: dữ liệu nổ gây ra bởi preaggregation quá mức. Như đã mô tả trước đó, OLAP dữ liệu nổ là kết quả của preaggregation đa chiều. Trong hệ thống OLAP truyền thống, dữ liệu mà không được preaggregated không có sẵn cho mục đích báo cáo và phân tích trừ khi tính toán trong thời gian chạy. Bởi precalculating và lưu trữ tất cả các kết hợp có thể có của tập hợp (ví dụ, tổng của tất cả các sản phẩm và mức sản phẩm trên tất cả các khoảng thời gian, trên tất cả các tổ chức, trên tất cả các kênh phân phối, vv), OLAP truyền thống sản phẩm tạo ra một vụ nổ dữ liệu lớn. Trái ngược với các phương pháp tính toán tất cả các aggregations có thể, OLAP dịch vụ xác định aggregations cung cấp các cải tiến hiệu suất lớn nhất, nhưng cũng cho phép người quản trị cơ sở dữ liệu OLAP để thực hiện một cân bằng giữa tốc độ hệ thống và không gian đĩa cần thiết để quản lý aggregations thông qua thiết kế lưu trữ Wizard. (Xem hình minh họa dưới đây.) Nếu nhà phát triển đã để precalculate tất cả aggregations, yêu cầu không gian đĩa sẽ được tối đa (vì sự bùng nổ dữ liệu hội chứng). Mặt khác, nếu nhà phát triển đã để precalculate không có gì, yêu cầu đĩa sẽ là số không, nhưng hiệu suất sẽ không được cải thiện.

Page 19: 90610940-Chapter-13-OLAP

Trong hầu hết trường hợp, OLAP dịch vụ có thể đạt được khoảng 80 phần trăm trong cải thiện hiệu suất truy vấn mà không có quá nhiều precomputation aggregations (sự bùng nổ theo cấp số nhân của dữ liệu thường xảy ra trong 20 phần trăm cuối cùng của aggregations). OLAP Dịch vụ phân tích các mô hình dữ liệu OLAP và heuristically xác định các thiết lập tối ưu của aggregations từ đó tất cả các aggregations khác có thể được bắt nguồn. Kết quả là dịch vụ bắt nguồn dữ liệu OLAP nonaggregated từ một vài hiện có giá trị tổng hợp thay vì phải quét toàn bộ kho dữ liệu. Chiến lược này của preaggregation một phần, tuy nhiên, mới chỉ là điểm khởi đầu. Mặc dù OLAP Dịch vụ chẩn đoán là tuyệt vời, họ được dựa trên mô hình toán học có thể có hoặc không tương ứng với mô hình sử dụng thực tế. Để thực hiện tối ưu hóa theo mô hình sử dụng thực tế, OLAP dịch vụ tùy chọn các bản ghi truy vấn được gửi đến máy chủ. Các nhật ký này sau đó có thể được sử dụng để tinh chỉnh các thiết lập của aggregations rằng OLAP dịch vụ duy trì. Ví dụ, sử dụng tối ưu hóa dựa trên Wizard cho phép người quản trị cơ sở dữ liệu để nói với OLAP dịch vụ để tạo ra một tập mới của aggregations cho tất cả các truy vấn kéo dài hơn giây n để trả lời (trong đó n có thể là 10 giây hoặc nhiều hơn). không gian đĩa có thể được mua trong khi có thể thời gian không. Nếu thời gian khai thác của các thông tin quan trọng có giá trị hơn chi phí mua dung lượng ổ cứng, giải pháp là rõ ràng. Các dịch vụ OLAP giải pháp cho dữ liệu nổ làm giảm thời gian cần thiết để quá trình tải ban đầu và cập nhật gia tăng, cũng như giảm thiểu lượng không gian đĩa cần thiết. Nếu một ứng dụng bắt đầu với một kho dữ liệu 10-GB và tạo ra 10 GB của aggregations, sau đó thời gian xử lý yêu cầu là một phần nhỏ trong số đó phải quá trình đầy đủ bộ aggregations phát nổ. Dịch vụ OLAP cũng đã thực hiện một cách tiếp cận sáng tạo để sparsity dữ liệu. Mặc dù các chi tiết của việc thực hiện nội bộ được sở hữu độc quyền, kết quả là cả hai MOLAP và ROLAP triển khai thực hiện quản lý các yêu cầu lưu trữ rất tốt, thường dẫn đến cơ sở dữ liệu với dung lượng nhỏ hơn nhu cầu của OLAP hơn các dữ liệu chi tiết ban đầu. khối ảo có thể được sử dụng bất cứ khi nào người dùng muốn xem thông tin tham gia từ hai khối khác nhau có chung vài như là kích thước phổ biến nhất. Tương tự như trong khái niệm đến một cái nhìn quan hệ, khối ảo là hai hay nhiều khối liên kết tại thời điểm truy vấn theo một hoặc nhiều kích thước thông thường. Một lợi ích của khối ảo áp dụng cho các tình huống trong đó dữ liệu sparsity là một vấn đề đáng kể. Ví dụ, một khối lập phương có chứa các biện pháp bán hàng của đơn vị và giá bán cũng có thể có một thước đo cho giá để tính giảm giá, nhưng giá trị giá sẽ được lặp lại nhiều lần. Bằng cách xây dựng một khối lập phương Bảng giá được tham gia trong một khối lập phương ảo với doanh số bán hàng của đơn vị và thông tin về giá bán, người quản trị cơ sở dữ liệu có thể loại bỏ phần lớn sự thừa dữ liệu. Khả năng để tạo ra hình khối ảo có nghĩa là nhiều giá trị không cần thiết có thể được loại bỏ từ lưu trữ dữ liệu OLAP hoàn toàn.

Hiệu suất và khả năng mở rộng

Page 20: 90610940-Chapter-13-OLAP

Các số liệu hiệu suất cụ thể của một ứng dụng OLAP là một chức năng của nhiều yếu tố, bao gồm cả kích thước cơ sở dữ liệu, khả năng tính toán phần cứng, và không gian đĩa cho dữ liệu preaggregated. Tuy nhiên, trong triển khai thực tế, OLAP các ứng dụng dựa trên dịch vụ đáp ứng với hầu hết các truy vấn trong ít hơn 5 giây và gần như tất cả các truy vấn trong vòng 10 giây. Các dịch vụ OLAP thực hiện các khối phân chia làm cho công nghệ cao, khả năng mở rộng. Một khối phân chia hợp lý cho phép một khối dữ liệu được truyền qua nhiều hình khối vật lý và thậm chí cả máy chủ vật lý riêng biệt. Trong phản ứng với một truy vấn của người dùng, OLAP Dịch vụ phân phối truy vấn trong số các máy chủ phân vùng, cho phép dữ liệu được lấy ra song song. Ví dụ, hãy xem xét trường hợp của một ứng dụng theo dõi các cuộc gọi điện thoại cho 10 vùng địa lý, nơi mà một trong những mong đợi vài triệu cuộc gọi mỗi ngày. Với mục đích phân tích, người ta có thể phân vùng dữ liệu trong số 10 máy chủ, từng có chứa các dữ liệu cho một vùng cụ thể. Từ góc độ người dùng, tuy nhiên, có một logic đơn giản chỉ là lập phương của dữ liệu. Để đáp ứng yêu cầu người sử dụng thông tin này, OLAP dịch vụ liên tục biến đổi các truy vấn thích hợp cho mỗi trong số 10 máy chủ và trả về một kết quả duy nhất đặt cho người dùng. Mỗi của 10 cơ sở dữ liệu cũng có sẵn để truy cập riêng biệt theo các nhà phân tích tìm kiếm thông tin cho rằng khu vực cụ thể.

Cung cấp thông tin để người dùng OLAP các

Trong lịch sử, bởi vì OLAP công nghệ máy chủ đã được gắn kết chặt chẽ với công nghệ độc quyền của khách hàng, khách hàng đã có sự lựa chọn nào trong việc lựa chọn của họ về hỗn hợp, tốt nhất sản phẩm-sinh sản. Điều này dẫn đến chi phí thực hiện cao và sự lựa chọn thường không đầy đủ cho các ứng dụng yêu cầu cả hai máy khách / máy chủ và dựa trên web cung cấp thông tin OLAP. Như đã được công nhận năm trước trong ngành công nghiệp cơ sở dữ liệu quan hệ, một giao diện chung là cần thiết để thúc đẩy sự cởi mở trong việc lựa chọn các ứng dụng và cơ sở dữ liệu. Các tiêu chuẩn công nghiệp đã trở thành ODBC.

Tiêu chuẩn Công nghiệp

Vấn đề của sự cởi mở trong các công cụ OLAP lần đầu tiên được đưa lên vào năm 1996, khi một tổ hợp các nhà cung cấp được gọi là Hội đồng OLAP công bố một tiêu chuẩn tương hợp, đa chiều giao diện lập trình ứng dụng (MDAPI), được có nghĩa là để mở thị trường với sự tham gia của nhà cung cấp lớn hơn. Mặc dù dự đoán nhiều khách hàng, cộng đồng các nhà cung cấp, bao gồm các thành viên của Hội đồng OLAP, thường xa lánh MDAPI. Thừa nhận sự cần thiết cho một tiêu chuẩn thống nhất rằng thừa hưởng các khoản đầu tư khách hàng hiện tại, Microsoft đã mở rộng định nghĩa của các hiện OLE DB API để truy cập dữ liệu bao gồm các khả năng đa chiều. Trong một năm, Microsoft công bố hai dự thảo của API, tìm kiếm thông tin phản hồi từ các nhà cung cấp và công chúng, và cuối cùng đưa ra một phiên bản cuối cùng trong tháng 2 năm 1998 đã được xác nhận bởi 18 nhà cung cấp với phiên bản beta.

Ngắt kết nối và giao hàng dựa trên web

Cá nhân thường cần để phân tích dữ liệu multidimensionally trong khi họ đang bị ngắt kết nối từ mạng của công ty, chẳng hạn như khi đi du lịch với một máy tính xách tay. Ngắt kết nối người dùng thường muốn xem và phân tích lát nhỏ của toàn bộ khối lập phương của họ, ví dụ, một quản lý bán hàng có thể muốn xem một bản tóm tắt doanh thu cho một vùng cụ thể khi đến thăm một văn phòng khu vực. cần như vậy là phổ biến mà máy tính để bàn OLAP (DOLAP), mà không yêu cầu một máy chủ chia sẻ để truy cập dữ liệu đa chiều, được tạo ra. Hầu hết các công nghệ máy chủ OLAP không cung cấp tạo ra trong suốt của hình khối DOLAP. Kết quả là, bước này đã được trái như nỗ lực khác chưa phát triển chuyên sâu hoặc xuống hạng vào các công cụ OLAP khách hàng có thêm chức năng hỗ trợ sử dụng máy tính để bàn. Nhìn chung, điều này đã làm tăng chi phí và độ phức tạp của việc cung cấp ứng dụng yêu cầu cả khách hàng kết nối và ngắt kết nối.Một công cụ xem phổ biến cho bất kỳ loại thông tin, đặc biệt là thông tin đa chiều, là một trình duyệt Web. phím A có nghĩa là giảm chi phí cho mỗi người sử dụng trong quy mô lớn các ứng dụng OLAP, trình duyệt web mở trên thế giới tiếp cận đa chiều cho một đối tượng rộng hơn. Hiện nay, có một số sản phẩm tốt và các công cụ để cung cấp dữ liệu qua mạng nội bộ OLAP một, nhưng không có cơ chế dễ dàng cho một nhà phát triển ứng dụng để tạo ra các công cụ OLAP xem.

Dịch vụ PivotTableCác dịch vụ máy chủ lưu trữ OLAP người sử dụng truy vấn và siêu dữ liệu cũng như dữ liệu. Lưu trữ các định nghĩa truy vấn và siêu dữ liệu làm cho nó có thể cho OLAP dịch vụ để trả lời các truy vấn mới bằng cách tính toán trước đây lưu trữ dữ liệu hơn là truy cập vào đĩa. Ví dụ, một người sử dụng yêu cầu dữ liệu bán hàng cho tháng Giêng, tháng Hai và tháng Ba. Một người dùng yêu cầu dữ liệu bán hàng trong quý đầu tiên. Dịch vụ OLAP có thể tóm tắt tháng giêng đến tháng ba từ bộ nhớ truy cập ngẫu nhiên (RAM) nhanh hơn nó có thể lấy các dữ liệu quý đầu từ đĩa.Dịch vụ OLAP độc đáo ở chỗ nó cung cấp nhiều các chức năng tương tự trên máy khách. Mỗi client kết nối đến máy chủ OLAP PivotTable Dịch vụ bằng cách sử dụng dịch vụ. Dịch vụ PivotTable hoạt động như một trình điều khiển để

Page 21: 90610940-Chapter-13-OLAP

quản lý các kết nối giữa máy khách và máy chủ. Dịch vụ PivotTable nhiều các mã tương tự như các máy chủ dịch vụ OLAP cổ phiếu, nâng tính đa chiều động cơ của máy chủ, tính năng bộ nhớ đệm, và quản lý truy vấn trực tiếp cho khách hàng. Kết quả là một sáng tạo của khách hàng / máy chủ, dữ liệu, quản lý mô hình tối ưu hóa hiệu suất và giảm thiểu lưu lượng mạng. Điều này đi kèm với chi phí tính toán rất nhỏ: Các không gian đĩa cần thiết cho PivotTable Dịch vụ được khoảng 2 MB, và yêu cầu bộ nhớ chỉ có 500 KB, thêm vào các dữ liệu lưu trữ.

Các dịch vụ OLAP thông minh khách hàng / máy chủ kiến trúc có khả năng xác định làm thế nào để trả lời một yêu cầu người dùng càng nhanh càng tốt, trong khi loại bỏ lưu lượng mạng dự phòng. Chìa khóa cho kiến trúc này được chia sẻ dữ liệu giữa máy khách và máy chủ. Khi người dùng yêu cầu thông tin từ máy chủ, cả dữ liệu và siêu dữ liệu (định nghĩa của cấu trúc hình khối) được tải về cho khách hàng. Có khối siêu dữ liệu hiện tại trên máy khách cho phép dịch vụ PivotTable để giải quyết mà yêu cầu cần phải được trả lại cho máy chủ để giải quyết.For example, recall the three-month sales data scenario. Ví dụ, nhớ lại ba tháng bán hàng dữ liệu kịch bản. Giả sử rằng cả hai dịch vụ OLAP ứng dụng máy chủ và máy khách mới được bắt đầu. Khi người dùng yêu cầu dữ liệu bán hàng cho tháng Giêng, tháng Hai và tháng Ba, các dữ liệu sẽ được lưu trữ trên máy chủ và cả khách hàng. Nếu người dùng sau đó yêu cầu dữ liệu cho quý đầu tiên, PivotTable Dịch vụ sẽ thu được kết quả tại địa phương (tại các khách hàng) mà không gửi các truy vấn đến máy chủ. Nếu người dùng sau đó hỏi xem dữ liệu từ quý đầu năm nay so với năm ngoái, dịch vụ PivotTable có trí thông minh để truy cập vào máy chủ dữ liệu của năm ngoái chỉ. PivotTable Dịch vụ cũng cung cấp cơ chế cho việc sử dụng ngắt kết nối. Các phần của khối lập phương được xác định và truy cập từ một máy chủ có thể được lưu trên máy khách cho sau này truy cập khi bị ngắt kết nối từ mạng. Bằng cách này, người dùng doanh nghiệp có thể mất một phần cơ sở dữ liệu của họ khi đi du lịch và vẫn có khả năng phân tích đầy đủ. Ngoài ra, PivotTable Dịch vụ cho phép người dùng tạo ra các mô hình đơn giản OLAP tại địa phương, truy cập thông tin trong các nguồn dữ liệu OLE DB tương thích, từ các tập tin phẳng để cơ sở dữ liệu máy tính để bàn. Cuối cùng, PivotTable Dịch vụ cung cấp kết nối cho các ứng dụng trên nền Web. Trong khi OLE DB cho OLAP là một lập trình giao diện cấp thấp, một phần mở rộng mới cho ActiveX Data Objects (ADO) cung cấp truy cập dữ liệu đa chiều. Điều này mở rộng, ADO được gọi là / MD, có thể được sử dụng để tạo các điều khiển ActiveX trong Visual Basic Microsoft phát triển hệ thống để trình duyệt, biểu đồ, hoặc báo cáo về dữ liệu trong OLAP Dịch vụ từ một trang Web. ADO / MD là lập trình ứng dụng doanh nghiệp của công cụ để đạt được truy cập vào các chức năng đầy đủ của dịch vụ OLAP.

Công cụ Affording OLAP

Thông thường, OLAP sản phẩm có thể có giá $ 50,000 đến $ 100,000 cho ít hơn 50 người sử dụng. Microsoft thừa nhận rằng OLAP là một mở rộng tự nhiên của công nghệ cơ sở dữ liệu và đã bao gồm dịch vụ OLAP là một tính năng của SQL Server 7.0. SQL Server 7.0 bao gồm các dữ liệu khác bổ sung cho kho bãi các tính năng:

Cơ sở dữ liệu Visual Tools, để tạo ra các lược đồ cơ sở dữ liệu

Dịch vụ chuyển đổi dữ liệu (DTS), để chiết xuất và chuyển đổi dữ liệu hoạt động vào kho dữ liệu

Microsoft Repository, để cung cấp một cửa hàng siêu dữ liệu thống nhất xây dựng trên SQL Server