Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Business Intelligence with SQL Server

3,459 views

Published on

What is Business Intelligence?
What do we need a Datawarehouse for?
Why a Cube?
What does SSIS do?
SQL Server Integration Services rocks!

Published in: Education
  • Be the first to comment

Business Intelligence with SQL Server

  1. 1. SQL Server 2008 for Business Intelligence UTS Short Course
  2. 2. <ul><li>Specializes in </li></ul><ul><ul><li>C# and .NET (Java not anymore) </li></ul></ul><ul><ul><li>Testing Automated tests </li></ul></ul><ul><ul><li>Agile, Scrum Certified Scrum Trainer </li></ul></ul><ul><ul><li>Technology aficionado </li></ul></ul><ul><ul><ul><li>Silverlight </li></ul></ul></ul><ul><ul><ul><li>ASP.NET </li></ul></ul></ul><ul><ul><ul><li>Windows Forms </li></ul></ul></ul>Peter Gfader
  3. 3. <ul><li>Attendance </li></ul><ul><ul><li>You initial sheet </li></ul></ul><ul><li>Hands On Lab </li></ul><ul><ul><li>You get me to initial sheet </li></ul></ul><ul><li>Homework </li></ul><ul><li>Certificate </li></ul><ul><ul><li>At end of 5 sessions </li></ul></ul><ul><ul><li>If I say if you have completed successfully  </li></ul></ul>Admin Stuff
  4. 4. <ul><li>Course Timetable & Materials </li></ul><ul><ul><li>http:// www.ssw.com.au/ssw/Events/2010UTSSQL/ </li></ul></ul><ul><li>Resources </li></ul><ul><ul><li>http:// sharepoint.ssw.com.au/Training/UTSSQL/ </li></ul></ul>Course Website
  5. 5. Course Overview Session Date Time Topic 1 Tuesday 14-09-2010 18:00 - 21:00 SSIS and Creating a Data Warehouse 2 Tuesday 21-09-2010 18:00 - 21:00 OLAP – Creating Cubes and Cube Issues 3 Tuesday 28-09-2010 18:00 - 21:00 Reporting Services 4 Tuesday 05-10-2010 18:00 - 21:00 Alternative Cube Browsers 5 Tuesday 12-10-2010 18:00 - 21:00 Data Mining
  6. 6. <ul><li>What is… </li></ul><ul><ul><li>Business Intelligence </li></ul></ul><ul><ul><li>Data Warehouse / Data Mart </li></ul></ul><ul><ul><li>SSIS (DTS) </li></ul></ul><ul><li>Steps in Creating a Data warehouse </li></ul><ul><ul><li>Analysis of Existing Data </li></ul></ul><ul><ul><li>Creating Structures </li></ul></ul><ul><ul><li>Clean and Load (Staging) </li></ul></ul>Session 1: Tonight’s Agenda
  7. 7. <ul><li>Automating with SSIS </li></ul><ul><li>Creating a Data Warehouse </li></ul><ul><li>Hands on Lab - You! </li></ul>Session 1: Tonight’s Agenda
  8. 8. <ul><li>Business intelligence (BI) is a broad category of applications and technologies for gathering, storing, analyzing, and providing access to data to help enterprise users make better business decisions. </li></ul><ul><li>Reports + Interactivity </li></ul>Business Intelligence Defined?
  9. 9. <ul><li>OLTP - O n L ine T ransaction P rocessing System </li></ul><ul><ul><li>Transactions </li></ul></ul><ul><li>Simple & Efficient </li></ul><ul><li>Optimized for 1 record at a time </li></ul>Our traditional data store = OLTP
  10. 10. Database
  11. 11. <ul><li>BI on top of OLTP </li></ul><ul><li>OK with little data... </li></ul>Reports on OLTP database
  12. 12. <ul><li>BI on top of OLTP </li></ul><ul><li>OK with little data... </li></ul><ul><ul><li>BI with little data??? </li></ul></ul>Reports on OLTP database
  13. 13. Reports on OLTP database <ul><li>BI on top of OLTP </li></ul><ul><li>OK with little data </li></ul><ul><ul><li>BI with little data??? </li></ul></ul><ul><li>SLOW with huge data </li></ul>
  14. 14. <ul><li>A database </li></ul><ul><li>The answer is &quot;a database&quot;, no matter what the question is </li></ul>Solution?
  15. 15. <ul><li>Database </li></ul><ul><li>Cleaned and Restructured for Analysis (normalized schemas) </li></ul>Data warehouse
  16. 16. Data Warehouse
  17. 17. We can go further...
  18. 18. OLAP Cubes
  19. 19. <ul><li>Pre calculated Data structure </li></ul><ul><ul><li>Fast analysis of data </li></ul></ul><ul><li>Dimensions and Measures (aggregations) </li></ul><ul><li>Dimension Hierarchies </li></ul><ul><li>Slice and Dice Measures by Dimensions </li></ul>OLAP Cubes
  20. 20. Let's do it
  21. 21. <ul><li>Create Data Warehouse </li></ul><ul><li>Copy data to data warehouse </li></ul><ul><li>Create OLAP Cubes </li></ul><ul><li>Create Reports </li></ul><ul><li>Do some Data Mining </li></ul><ul><ul><li>Discovering a Relationship that was not obvious </li></ul></ul><ul><ul><li>Predict future events (e.g. targeting and forecasting) </li></ul></ul>Steps
  22. 22. 1. Create the Data Warehouse
  23. 23. <ul><li>What do you want to get out of it? </li></ul><ul><ul><li>How much stock do we need? </li></ul></ul><ul><ul><li>When are our highest sales? </li></ul></ul><ul><ul><li>How many bikes did we sell last June? </li></ul></ul><ul><li>Identify Candidate Data </li></ul><ul><ul><li>Look at the data, see what might be useful </li></ul></ul><ul><li>Identify Dimensions and Measures </li></ul><ul><ul><li>Year, Product, Employee, etc (Dimensions) </li></ul></ul><ul><ul><li>Sales Amount, Quantity, etc (Measures) </li></ul></ul>Creating a Data Warehouse
  24. 24. <ul><li>Build Structure </li></ul><ul><ul><li>Facts (Measures) and Dimensions </li></ul></ul><ul><ul><li>Snowflake Schema </li></ul></ul>Creating a Data Warehouse
  25. 25. Theory
  26. 26. <ul><li>2 types of columns </li></ul><ul><li>Numeric facts </li></ul><ul><li>Foreign keys to dimensions </li></ul><ul><li>Contains </li></ul><ul><li>Detail-level facts </li></ul><ul><li>or </li></ul><ul><li>Aggregated facts </li></ul>Fact table
  27. 27. <ul><li>Categorizes data </li></ul><ul><li>Small in size </li></ul>Dimension Tables
  28. 28. <ul><li>Simplest schema for a data warehouse </li></ul><ul><li>Center is a fact table </li></ul>Star schema
  29. 29. <ul><li>Variation of star schema </li></ul><ul><li>More complex </li></ul><ul><li>Dimensions are normalized </li></ul>Snowflake schema
  30. 30. <ul><li>Revenue is fact </li></ul><ul><li>Dimensions to see data </li></ul>Example: Retail chain
  31. 31. Creating a Data Warehouse - Snowflake schema
  32. 32. SQL Server’s Own Data Warehouse
  33. 46. 2. Copy data to data warehouse
  34. 47. <ul><li>Microsofts answer: SSIS </li></ul><ul><li>S QL S erver I ntegration S ervices </li></ul><ul><li>Load Data </li></ul><ul><ul><li>Extract, Transform (clean) and Load </li></ul></ul>Copy data to data warehouse
  35. 48. <ul><li>Replaces DTS (Data Transform Services) </li></ul><ul><li>SQL Server Integration Services </li></ul><ul><li>Extract, Transform and Load (ETL) </li></ul><ul><ul><li>Moving Data Around </li></ul></ul><ul><li>Automation </li></ul><ul><li>Batch Processing </li></ul><ul><li>Advanced error handling and programming control </li></ul>What is SSIS?
  36. 49. <ul><li>SQL Tasks </li></ul><ul><ul><li>Checking Integrity </li></ul></ul><ul><ul><li>Clearing Stage Data </li></ul></ul><ul><ul><li>Rebuilding Indexes </li></ul></ul><ul><ul><li>Determining Surrogate Keys </li></ul></ul><ul><li>Data Flow Tasks (ETL) </li></ul><ul><ul><li>Sources </li></ul></ul><ul><ul><li>Transformations </li></ul></ul><ul><ul><li>Destinations </li></ul></ul><ul><li>SSIS </li></ul><ul><ul><li>Puts it all together </li></ul></ul><ul><ul><li>Controls Sequencing and Conditional Flow </li></ul></ul><ul><ul><li>Packages can be run as jobs in SQL Server </li></ul></ul>Automating with SSIS
  37. 50. SSIS Designer <ul><li>What can we do? </li></ul><ul><li>What can we import data from? </li></ul><ul><li>What can we export data to? </li></ul><ul><li>What can we do to the data? </li></ul>
  38. 51. <ul><li>Almost anything you want! </li></ul><ul><ul><li>Import data from one database to another </li></ul></ul><ul><ul><li>FTP a file to a server </li></ul></ul><ul><ul><li>Run SQL commands </li></ul></ul><ul><ul><li>Send an email </li></ul></ul><ul><ul><li>Call a web service </li></ul></ul><ul><ul><li>Perform database maintenance tasks </li></ul></ul>What can we do?
  39. 53. What can we import from? <ul><li>ADO.NET </li></ul><ul><li>Excel </li></ul><ul><li>Flat File </li></ul><ul><li>OLE DB </li></ul><ul><li>Raw File </li></ul><ul><li>XML </li></ul>
  40. 54. What can we export to? <ul><li>Same as what we can import from plus: </li></ul><ul><ul><li>Data Mining Model Training </li></ul></ul><ul><ul><li>Dimension Processing </li></ul></ul><ul><ul><li>Partition Processing </li></ul></ul><ul><ul><li>SQL Server </li></ul></ul>
  41. 55. <ul><li>Compare </li></ul><ul><li>Split </li></ul><ul><li>Filter </li></ul><ul><li>Convert </li></ul><ul><li>Group </li></ul><ul><li>Join </li></ul><ul><li>Aggregate </li></ul><ul><li>Sample </li></ul><ul><li>Sort </li></ul><ul><li>Pivot </li></ul>What can we do to the data?
  42. 56. What is SSIS?
  43. 57. <ul><li>Use it to gather data from different datasources </li></ul><ul><ul><li>Import data from an employee list stored in excel </li></ul></ul><ul><ul><li>Export data to XML and mail it to another company for them to use </li></ul></ul><ul><ul><li>Pull accounting and salary info from MYOB, performance information from TFS/CRM and use the data to generate KPI reports </li></ul></ul>So what can you do with this?
  44. 58. Creating a Data Warehouse – Data Warehouse Architecture
  45. 59. <ul><li>Current data </li></ul><ul><li>Short database transactions </li></ul><ul><li>Online update/insert/delete </li></ul><ul><li>Normalization is promoted </li></ul><ul><li>High volume transactions </li></ul><ul><li>Transaction recovery is necessary </li></ul><ul><li>Current and historical data </li></ul><ul><li>Long database transactions </li></ul><ul><li>Batch update/insert/delete </li></ul><ul><li>Denormalization is promoted </li></ul><ul><li>Low volume transactions </li></ul><ul><li>Transaction recovery is not necessary </li></ul>OLTP OLAP vs
  46. 60. <ul><li>The 5 Sessions </li></ul><ul><li>What is… </li></ul><ul><ul><li>Business Intelligence </li></ul></ul><ul><ul><li>Data Warehouse/Data Mart </li></ul></ul><ul><ul><li>SSIS </li></ul></ul><ul><li>Steps in Creating a Datawarehouse </li></ul><ul><ul><li>Analysis of Existing Data </li></ul></ul><ul><ul><li>Creating Structures </li></ul></ul><ul><ul><li>Clean and Load (Staging) </li></ul></ul><ul><li>Automating with SSIS </li></ul><ul><li>Creating a Data Warehouse </li></ul>Summary
  47. 61. 3 things… <ul><li>PeterGfader @ssw.com.au </li></ul><ul><li>http:// blog.gfader.com/ </li></ul><ul><li>twitter.com/ peitor </li></ul>
  48. 62. <ul><li>Thank You! </li></ul><ul><li>Gateway Court Suite 10 81 - 91 Military Road Neutral Bay, Sydney NSW 2089 AUSTRALIA </li></ul><ul><li>ABN: 21 069 371 900 </li></ul><ul><li>Phone: + 61 2 9953 3000 Fax: + 61 2 9953 3105 </li></ul><ul><li>[email_address] www.ssw.com.au </li></ul>

×