Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 432 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
432
Dung lượng
24,79 MB
Nội dung
www.it-ebooks.info For your convenience Apress has placed some of the front matter material after the index Please use the Bookmarks and Contents at a Glance links to access them www.it-ebooks.info Contents at a Glance About the Authors��������������������������������������������������������������������������������������������������������������xiii About the Technical Reviewer�������������������������������������������������������������������������������������������� xv Acknowledgments������������������������������������������������������������������������������������������������������������ xvii Introduction����������������������������������������������������������������������������������������������������������������������� xix ■■Chapter 1: Business Intelligence Basics���������������������������������������������������������������������������1 ■■Chapter 2: Visio Services�������������������������������������������������������������������������������������������������59 ■■Chapter 3: Reporting Services���������������������������������������������������������������������������������������143 ■■Chapter 4: Business Connectivity Services�������������������������������������������������������������������187 ■■Chapter 5: Excel Services����������������������������������������������������������������������������������������������247 ■■Chapter 6: PerformancePoint Services�������������������������������������������������������������������������305 Index���������������������������������������������������������������������������������������������������������������������������������411 v www.it-ebooks.info Introduction In working with SharePoint and with BI, we frequently found that there was no single source of information that could address the needs of both database administrators (DBAs) and SharePoint administrators and developers With that in mind, we decided to write one In fairness, given the pace of the technology we deal with, it’s very difficult to find one source for it all But, in order to deliver solutions with these modern platforms, one needs to know core business intelligence (BI) concepts as well as core SharePoint BI concepts SharePoint is becoming the de facto choice for delivery of BI products for Microsoft This has been happening ever since the introduction of Visio Services, Business Connectivity Services, Reporting Services, Excel Services, PerformancePoint Services and, as icing on the cake, Power View for interactive analytics Even if you are an experienced NET developer, you’ll find it difficult to find a single book that teaches enough of all these technologies and BI concepts That’s why we put this book together—to address that unique and fascinating area that is the intersection of BI and SharePoint 2013 The first chapter gets you familiar with enough BI concepts to get you going, even if you have no background in BI Expert DBAs can skip this chapter The subsequent chapters focus on each of the core SharePoint BI concepts one by one, and they give you enough examples to explore each of these topics in detail Moreover, we made it a point not to ignore the administrative side of things In each chapter, we introduce you to the various facilities in central administration, and we also look at the PowerShell commands relevant to these features Writing any book is a lot of work We hope you find it useful xix www.it-ebooks.info Chapter Business Intelligence Basics This chapter presents the basics of business intelligence (BI) If you’re an experienced data-warehouse expert, you might want to skip this chapter, except for the section at the end that introduces Microsoft SharePoint 2013 BI concepts But, because most readers will be SharePoint experts, not data-warehouse experts, we feel it necessary to include the fundamentals of data warehousing in this book Although we can‘t cover every detail, we’ll tell you everything you need to get full value from the book, and we’ll refer you to other resources for more advanced topics What Will You Learn? By the end of this chapter, you’ll learn about the following: • The essentials of BI • The OLAP system and its components • Microsoft SQL Server 2012 BI tools • SharePoint 2013 BI components Software Prerequisites You’ll need a basic understanding of databases and the relevant tools to get the most out of the topics in this book You’ll also need the software listed here: • SharePoint Server 2013 Enterprise Edition • SQL Server 2012 Developer Edition and its BI tools, SSDT (SQL Server Development Tools, formerly known as BIDS, or Business Intelligence Development Studio) for Microsoft Visual Studio 2010 • SQL Server 2012 Developer Training Kit, available for download at http://www.microsoft.com/en-us/download/details.aspx?id=27721 • AdventureWorks DB for SQL Server 2012, available for download at http://msftdbprodsamples.codeplex.com/releases/view/55330 • Visual Studio 2012 Professional Edition, trial version available for download at http://www.microsoft.com/visualstudio/eng/products/visual-studio-professional-2012 www.it-ebooks.info Chapter ■ Business Intelligence Basics • Microsoft SharePoint Designer 2013, available for download at http://www.microsoft.com/en-us/download/details.aspx?id=35491 • If you prefer to use Express editions of Visual Studio and SQL Server instead of the full versions, you can download them from http://www.microsoft.com/express/ ■■Note At the time of writing, Microsoft had not released SQL Server 2012 Business Intelligence project templates for Visual Studio 2012 Hence, we use Visual Studio 2010 throughout this book to develop BI projects, and Visual Studio 2012 to develop solutions specific to SharePoint 2013 Introduction to Business Intelligence Effective decision-making is the key to success, and you can’t make effective decisions without appropriate and accurate information Data won’t you much good if you can’t get any intelligent information from it, and to that, you need to be able to analyze the data properly There’s a lot of information embedded in the data in various forms and views that can help organizations and individuals create better plans for the future We’ll start here with the fundamentals of drilling down into data—how to it and how you can take advantage of it I couldn’t resist including a picture here that highlights the benefits of BI (See Figure 1-1.) This drawing was presented by Hasso Plattner of the Hasso Plattner Institute for IT Systems at the SIGMOD Keynote Talk (SIGMOD is the Special Interest Group on Management of Data of the Association for Computing Machinery.) Figure 1-1. Information at your fingertips! www.it-ebooks.info Chapter ■ Business Intelligence Basics Why Intelligence? Chances are you’ve seen the recommendations pages on sites such as Netflix, Wal-Mart, and Amazon On Netflix, for example, you can choose your favorite genre, and then select movies to order or watch online Next time you log in, you’ll see a “Movies you’ll love” section with several suggestions based on your previous choices Clearly, there’s some kind of intelligence-based system running behind these recommendations Now, don’t worry about what technologies the Netflix web application is built on Let’s just try to analyze what’s going on behind the scenes First, because there are recommendations, there must be some kind of tracking mechanism for your likes and dislikes based on your choices or the ratings you provide Second, recommendations might be based on other users’ average ratings minus yours for a given genre Each user provides enough information to let Netflix drill down, aggregate, and otherwise analyze different scenarios This analysis can be simple or complex, depending on many other factors, including total number of users, movies watched, genre, ratings, and so on—with endless possibilities Now consider a related but different example—your own online banking information The account information in your profile is presented in various charts on various timelines, and so forth, and you can use tools to add or alter information to see how your portfolio might look in the future So think along the same lines, but this time about a big organization with millions of records that can be explored to give CIOs or CFOs a picture of their company’s assets, revenues, sales, and so forth It doesn’t matter if the organization is financial, medical, technical, or whatever, or what the details of the information are There’s no limit to how data can be drilled down into and understood In the end, it boils down to one thing—using business intelligence to enable effective decision making Let’s get started on our explorations of the basics and building blocks of business intelligence Understanding BI Just about any kind of business will benefit from having appropriate, accurate, and up-to-date information to make key decisions The question is, how you get this information when the data is tightly coupled with business—and is continually in use? In general, you need to think about questions such as the following: • How can you drill down into tons of information, aggregate that information, and perform mathematical calculations to analyze it? • How can you use such information to understand what’s happened in the past as well as what’s happening now, and thereby build better solutions for the future? Here are some typical and more specific business-related questions you might have to answer: • What are the newly created accounts this month? • Which new users joined this quarter? • Which accounts have been removed this year? • How many vehicles have we sold this year, and what’s the new inventory? • How many issues have been addressed this week in the command center? • What is the failure rate of products in this unit? • What are the all-time top 10 stocks? • Can you rank these employees in terms of monthly sales? • Is it possible to run statistical analysis on existing data? www.it-ebooks.info Chapter ■ Business Intelligence Basics What kind of system could provide the means to answer these questions? A comprehensive business intelligence system is a powerful mechanism for digging into, analyzing, and reporting on your data ■■Note Business intelligence is all about decisions made effectively with accurate information in a timely manner Data mostly has a trend or a paradigm When you’re looking at the data, you might begin to wonder, “What if ” To answer this question, you need the business intelligence mechanism Understanding the basics of BI or datawarehouse modeling helps you achieve accurate results Every industry, organization, enterprise, firm, or even individual has information stored in some format in databases or files somewhere Sometimes this data will just be read, and sometimes it needs to be modified and provide instant results In such cases, one significant factor is the size of the data Databases that yield instant results by adding, editing, or deleting information deal with transactional1 data Such information needs a quick turnaround from the applications In such cases, users seek or provide information via the UI or another source, and the result of any subsequent read, publish, edit, or even delete must happen instantly Transaction results must also be delivered instantly, with low latency A system that can deliver such instant results usually is based on the model called Online Transaction Processing, or just OLTP OLTP vs OLAP Online Transaction Processing (OLTP) systems are more suitable for handling transactional data and optimized for performance during Read/Write operations specifically for a faster response On the other hand, Online Analytical Processing (OLAP) systems are read-only (though there can be exceptions) and are specifically meant for analytical purposes This section explores these two systems in more detail Online Transaction Processing System Data in the OLTP model is relational, and it is normalized according to database standards—such as the third or fourth normal form Normalization involves splitting large tables into smaller tables to minimize redundancy and dependency in data For example, instead of storing an employee’s department details in the employee table itself, it would be better to store the same information in a department table and link it to the employee table An important factor in the OLTP model is that data doesn’t repeat in any fashion; hence, it is arranged into more than one table In this way, transactions involve fewer tables and columns, thus increasing performance There are fewer indexes and more joins in this model, and the tables will hold the key information Figure 1-2 shows a basic OLTP system Data related to day-to-day transactions, expected to change on a frequent basis is referred to as transactional data Examples include employee payroll data, purchase orders, procurements, and so on Transactional data is created, updated, and deleted via a sequence of logically related, indivisible operations called transactions www.it-ebooks.info Chapter ■ Business Intelligence Basics Figure 1-2. HR Relational Tables from the AdventureWorks database ■■Note We strongly recommend you download and install the AdventureWorks sample database from msftdbprodsamples.codeplex.com/downloads/get/417885 You’ll get the most out of this chapter and the others if you can follow along OLTP is not meant for slicing and dicing the data, and it’s definitely not meant to be used to make key decisions based on the data OLTP is real-time, and it’s optimized for performance during Read/Write operations specifically for a faster response For example, an OLTP system is meant to support an airline reservation system that needs to publish airline schedules, tariffs, and availability and at the same support transactions related to ticket reservations and cancellations The system cannot be used for analysis because that would degrade the performance of routine transactions Moreover, a normalized structure is not suitable for analysis (for example, revenue analysis for an airline) because this involves joins between various tables to pull relevant information, leading to increased query complexity Take a look at Figure 1-3 Notice how information is limited or incomplete You cannot tell what the numbers or codes are for various columns To get more information on these values, you need to run a query that joins this table with others, and the query would become bigger and bigger as the number of relational tables increases Figure 1-3. A table with incomplete information www.it-ebooks.info Chapter ■ Business Intelligence Basics On the other hand, it would be very easy to query the table if it were a little bit denormalized and had some data pre-populated, as shown in Figure 1-4 In this case, the number of joins is reduced, thereby shortening the T-SQL query This simplifies the query and improves the performance However, the performance depends on the efficiency of indexing Further, denormalizing the tables causes excessive I/O Figure 1-4. The denormalized table ■■Caution As you can see in Figure 1-4, the T-SQL query would be simplified, but denormalized tables can cause excessive I/O because they contain fewer records on a page It depends on the efficiency of the indexing The data and indexes also consume more disk space than normalized data You might wonder why you can’t simply run these queries on your OLTP database without worries about performance Or create views Simply put, OLTP databases are meant for regular transactions that happen every day in your organization These are real-time and current at any point of time, which makes OLTP a desirable model However, this model is not designed to run powerful analyses on these databases It’s not that you can’t run formulas or aggregates, it’s that the database might have been built to support most of the applications running in your organization and when you try to the analysis, these applications take longer to run You don’t want your queries to interfere with or block the daily operations of your system ■■Note To scale operations, some organizations split an OLTP database into two separate databases (that is, they replicate the database) One database handles only write operations, while the other is used for read operations on the tables (after the transactions take place) Through code, applications manage the data so that it is written to one database and read for presentation from another This way, transactions take place on one database and analysis can happen on the second This might not be suitable for every organization So what can you do? Archive the database! One way that many organizations are able to run their analyses on OLTP databases is to simply perform periodic backups or archive the real-time database, and then run their queries on the disconnected-mode (non-real-time) data ■■Note A database that has been backed up and repurposed (copied) for running analyses might require a refresh because the original source database might have had data updated or values changed www.it-ebooks.info ... www.it-ebooks.info Chapter ■ Business Intelligence Basics For example, if (Region.East, Time.[Quarter 4], Product.Prod1) is one of your tuples, and (Region.East, Time.[Quarter 1], Product.Prod2) is the second,... Project From the available project types, choose Integration Services (under Business Intelligence Projects), and from the Templates choose Integration Services Project Provide the necessary details... Server 2012 Business Intelligence project templates for Visual Studio 2012 Hence, we use Visual Studio 2010 throughout this book to develop BI projects, and Visual Studio 2012 to develop solutions