- SQL Server Reference Guide
- Introduction
- SQL Server Reference Guide Overview
- Table of Contents
- Microsoft SQL Server Defined
- SQL Server Editions
- SQL Server Access
- Informit Articles and Sample Chapters
- Online Resources
- Microsoft SQL Server Features
- SQL Server Books Online
- Clustering Services
- Data Transformation Services (DTS) Overview
- Replication Services
- Database Mirroring
- Natural Language Processing (NLP)
- Analysis Services
- Microsot SQL Server Reporting Services
- XML Overview
- Notification Services for the DBA
- Full-Text Search
- SQL Server 2005 - Service Broker
- Using SQL Server as a Web Service
- SQL Server Encryption Options Overview
- SQL Server 2008 Overview
- SQL Server 2008 R2 Overview
- SQL Azure
- The Utility Control Point and Data Application Component, Part 1
- The Utility Control Point and Data Application Component, Part 2
- Microsoft SQL Server Administration
- The DBA Survival Guide: The 10 Minute SQL Server Overview
- Preparing (or Tuning) a Windows System for SQL Server, Part 1
- Preparing (or Tuning) a Windows System for SQL Server, Part 2
- Installing SQL Server
- Upgrading SQL Server
- SQL Server 2000 Management Tools
- SQL Server 2005 Management Tools
- SQL Server 2008 Management Tools
- SQL Azure Tools
- Automating Tasks with SQL Server Agent
- Run Operating System Commands in SQL Agent using PowerShell
- Automating Tasks Without SQL Server Agent
- Storage – SQL Server I/O
- Service Packs, Hotfixes and Cumulative Upgrades
- Tracking SQL Server Information with Error and Event Logs
- Change Management
- SQL Server Metadata, Part One
- SQL Server Meta-Data, Part Two
- Monitoring - SQL Server 2005 Dynamic Views and Functions
- Monitoring - Performance Monitor
- Unattended Performance Monitoring for SQL Server
- Monitoring - User-Defined Performance Counters
- Monitoring: SQL Server Activity Monitor
- SQL Server Instances
- DBCC Commands
- SQL Server and Mail
- Database Maintenance Checklist
- The Maintenance Wizard: SQL Server 2000 and Earlier
- The Maintenance Wizard: SQL Server 2005 (SP2) and Later
- The Web Assistant Wizard
- Creating Web Pages from SQL Server
- SQL Server Security
- Securing the SQL Server Platform, Part 1
- Securing the SQL Server Platform, Part 2
- SQL Server Security: Users and other Principals
- SQL Server Security – Roles
- SQL Server Security: Objects (Securables)
- Security: Using the Command Line
- SQL Server Security - Encrypting Connections
- SQL Server Security: Encrypting Data
- SQL Server Security Audit
- High Availability - SQL Server Clustering
- SQL Server Configuration, Part 1
- SQL Server Configuration, Part 2
- Database Configuration Options
- 32- vs 64-bit Computing for SQL Server
- SQL Server and Memory
- Performance Tuning: Introduction to Indexes
- Statistical Indexes
- Backup and Recovery
- Backup and Recovery Examples, Part One
- Backup and Recovery Examples, Part Two: Transferring Databases to Another System (Even Without Backups)
- SQL Profiler - Reverse Engineering An Application
- SQL Trace
- SQL Server Alerts
- Files and Filegroups
- Partitioning
- Full-Text Indexes
- Read-Only Data
- SQL Server Locks
- Monitoring Locking and Deadlocking
- Controlling Locks in SQL Server
- SQL Server Policy-Based Management, Part One
- SQL Server Policy-Based Management, Part Two
- SQL Server Policy-Based Management, Part Three
- Microsoft SQL Server Programming
- An Outline for Development
- Database
- Database Services
- Database Objects: Databases
- Database Objects: Tables
- Database Objects: Table Relationships
- Database Objects: Keys
- Database Objects: Constraints
- Database Objects: Data Types
- Database Objects: Views
- Database Objects: Stored Procedures
- Database Objects: Indexes
- Database Objects: User Defined Functions
- Database Objects: Triggers
- Database Design: Requirements, Entities, and Attributes
- Business Process Model Notation (BPMN) and the Data Professional
- Business Questions for Database Design, Part One
- Business Questions for Database Design, Part Two
- Database Design: Finalizing Requirements and Defining Relationships
- Database Design: Creating an Entity Relationship Diagram
- Database Design: The Logical ERD
- Database Design: Adjusting The Model
- Database Design: Normalizing the Model
- Creating The Physical Model
- Database Design: Changing Attributes to Columns
- Database Design: Creating The Physical Database
- Database Design Example: Curriculum Vitae
- NULLs
- The SQL Server Sample Databases
- The SQL Server Sample Databases: pubs
- The SQL Server Sample Databases: NorthWind
- The SQL Server Sample Databases: AdventureWorks
- The SQL Server Sample Databases: Adventureworks Derivatives
- UniversalDB: The Demo and Testing Database, Part 1
- UniversalDB: The Demo and Testing Database, Part 2
- UniversalDB: The Demo and Testing Database, Part 3
- UniversalDB: The Demo and Testing Database, Part 4
- Getting Started with Transact-SQL
- Transact-SQL: Data Definition Language (DDL) Basics
- Transact-SQL: Limiting Results
- Transact-SQL: More Operators
- Transact-SQL: Ordering and Aggregating Data
- Transact-SQL: Subqueries
- Transact-SQL: Joins
- Transact-SQL: Complex Joins - Building a View with Multiple JOINs
- Transact-SQL: Inserts, Updates, and Deletes
- An Introduction to the CLR in SQL Server 2005
- Design Elements Part 1: Programming Flow Overview, Code Format and Commenting your Code
- Design Elements Part 2: Controlling SQL's Scope
- Design Elements Part 3: Error Handling
- Design Elements Part 4: Variables
- Design Elements Part 5: Where Does The Code Live?
- Design Elements Part 6: Math Operators and Functions
- Design Elements Part 7: Statistical Functions
- Design Elements Part 8: Summarization Statistical Algorithms
- Design Elements Part 9:Representing Data with Statistical Algorithms
- Design Elements Part 10: Interpreting the Data—Regression
- Design Elements Part 11: String Manipulation
- Design Elements Part 12: Loops
- Design Elements Part 13: Recursion
- Design Elements Part 14: Arrays
- Design Elements Part 15: Event-Driven Programming Vs. Scheduled Processes
- Design Elements Part 16: Event-Driven Programming
- Design Elements Part 17: Program Flow
- Forming Queries Part 1: Design
- Forming Queries Part 2: Query Basics
- Forming Queries Part 3: Query Optimization
- Forming Queries Part 4: SET Options
- Forming Queries Part 5: Table Optimization Hints
- Using SQL Server Templates
- Transact-SQL Unit Testing
- Index Tuning Wizard
- Unicode and SQL Server
- SQL Server Development Tools
- The SQL Server Transact-SQL Debugger
- The Transact-SQL Debugger, Part 2
- Basic Troubleshooting for Transact-SQL Code
- An Introduction to Spatial Data in SQL Server 2008
- Performance Tuning
- Performance Tuning SQL Server: Tools and Processes
- Performance Tuning SQL Server: Tools Overview
- Creating a Performance Tuning Audit - Defining Components
- Creating a Performance Tuning Audit - Evaluation Part One
- Creating a Performance Tuning Audit - Evaluation Part Two
- Creating a Performance Tuning Audit - Interpretation
- Creating a Performance Tuning Audit - Developing an Action Plan
- Understanding SQL Server Query Plans
- Performance Tuning: Implementing Indexes
- Performance Monitoring Tools: Windows 2008 (and Higher) Server Utilities, Part 1
- Performance Monitoring Tools: Windows 2008 (and Higher) Server Utilities, Part 2
- Performance Monitoring Tools: Windows System Monitor
- Performance Monitoring Tools: Logging with System Monitor
- Performance Monitoring Tools: User Defined Counters
- General Transact-SQL (T-SQL) Performance Tuning, Part 1
- General Transact-SQL (T-SQL) Performance Tuning, Part 2
- General Transact-SQL (T-SQL) Performance Tuning, Part 3
- Performance Monitoring Tools: An Introduction to SQL Profiler
- Performance Tuning: Introduction to Indexes
- Performance Monitoring Tools: SQL Server 2000 Index Tuning Wizard
- Performance Monitoring Tools: SQL Server 2005 Database Tuning Advisor
- Performance Monitoring Tools: SQL Server Management Studio Reports
- Performance Monitoring Tools: SQL Server 2008 Activity Monitor
- The SQL Server 2008 Management Data Warehouse and Data Collector
- Performance Monitoring Tools: Evaluating Wait States with PowerShell and Excel
- Practical Applications
- Choosing the Back End
- The DBA's Toolbox, Part 1
- The DBA's Toolbox, Part 2
- Scripting Solutions for SQL Server
- Building a SQL Server Lab
- Using Graphics Files with SQL Server
- Enterprise Resource Planning
- Customer Relationship Management (CRM)
- Building a Reporting Data Server
- Building a Database Documenter, Part 1
- Building a Database Documenter, Part 2
- Data Management Objects
- Data Management Objects: The Server Object
- Data Management Objects: Server Object Methods
- Data Management Objects: Collections and the Database Object
- Data Management Objects: Database Information
- Data Management Objects: Database Control
- Data Management Objects: Database Maintenance
- Data Management Objects: Logging the Process
- Data Management Objects: Running SQL Statements
- Data Management Objects: Multiple Row Returns
- Data Management Objects: Other Database Objects
- Data Management Objects: Security
- Data Management Objects: Scripting
- Powershell and SQL Server - Overview
- PowerShell and SQL Server - Objects and Providers
- Powershell and SQL Server - A Script Framework
- Powershell and SQL Server - Logging the Process
- Powershell and SQL Server - Reading a Control File
- Powershell and SQL Server - SQL Server Access
- Powershell and SQL Server - Web Pages from a SQL Query
- Powershell and SQL Server - Scrubbing the Event Logs
- SQL Server 2008 PowerShell Provider
- SQL Server I/O: Importing and Exporting Data
- SQL Server I/O: XML in Database Terms
- SQL Server I/O: Creating XML Output
- SQL Server I/O: Reading XML Documents
- SQL Server I/O: Using XML Control Mechanisms
- SQL Server I/O: Creating Hierarchies
- SQL Server I/O: Using HTTP with SQL Server XML
- SQL Server I/O: Using HTTP with SQL Server XML Templates
- SQL Server I/O: Remote Queries
- SQL Server I/O: Working with Text Files
- Using Microsoft SQL Server on Handheld Devices
- Front-Ends 101: Microsoft Access
- Comparing Two SQL Server Databases
- English Query - Part 1
- English Query - Part 2
- English Query - Part 3
- English Query - Part 4
- English Query - Part 5
- RSS Feeds from SQL Server
- Using SQL Server Agent to Monitor Backups
- Reporting Services - Creating a Maintenance Report
- SQL Server Chargeback Strategies, Part 1
- SQL Server Chargeback Strategies, Part 2
- SQL Server Replication Example
- Creating a Master Agent and Alert Server
- The SQL Server Central Management System: Definition
- The SQL Server Central Management System: Base Tables
- The SQL Server Central Management System: Execution of Server Information (Part 1)
- The SQL Server Central Management System: Execution of Server Information (Part 2)
- The SQL Server Central Management System: Collecting Performance Metrics
- The SQL Server Central Management System: Centralizing Agent Jobs, Events and Scripts
- The SQL Server Central Management System: Reporting the Data and Project Summary
- Time Tracking for SQL Server Operations
- Migrating Departmental Data Stores to SQL Server
- Migrating Departmental Data Stores to SQL Server: Model the System
- Migrating Departmental Data Stores to SQL Server: Model the System, Continued
- Migrating Departmental Data Stores to SQL Server: Decide on the Destination
- Migrating Departmental Data Stores to SQL Server: Design the ETL
- Migrating Departmental Data Stores to SQL Server: Design the ETL, Continued
- Migrating Departmental Data Stores to SQL Server: Attach the Front End, Test, and Monitor
- Tracking SQL Server Timed Events, Part 1
- Tracking SQL Server Timed Events, Part 2
- Patterns and Practices for the Data Professional
- Managing Vendor Databases
- Consolidation Options
- Connecting to a SQL Azure Database from Microsoft Access
- SharePoint 2007 and SQL Server, Part One
- SharePoint 2007 and SQL Server, Part Two
- SharePoint 2007 and SQL Server, Part Three
- Querying Multiple Data Sources from a Single Location (Distributed Queries)
- Importing and Exporting Data for SQL Azure
- Working on Distributed Teams
- Professional Development
- Becoming a DBA
- Certification
- DBA Levels
- Becoming a Data Professional
- SQL Server Professional Development Plan, Part 1
- SQL Server Professional Development Plan, Part 2
- SQL Server Professional Development Plan, Part 3
- Evaluating Technical Options
- System Sizing
- Creating a Disaster Recovery Plan
- Anatomy of a Disaster (Response Plan)
- Database Troubleshooting
- Conducting an Effective Code Review
- Developing an Exit Strategy
- Data Retention Strategy
- Keeping Your DBA/Developer Job in Troubled Times
- The SQL Server Runbook
- Creating and Maintaining a SQL Server Configuration History, Part 1
- Creating and Maintaining a SQL Server Configuration History, Part 2
- Creating an Application Profile, Part 1
- Creating an Application Profile, Part 2
- How to Attend a Technical Conference
- Tips for Maximizing Your IT Budget This Year
- The Importance of Blue-Sky Planning
- Application Architecture Assessments
- Transact-SQL Code Reviews, Part One
- Transact-SQL Code Reviews, Part Two
- Cloud Computing (Distributed Computing) Paradigms
- NoSQL for the SQL Server Professional, Part One
- NoSQL for the SQL Server Professional, Part Two
- Object-Role Modeling (ORM) for the Database Professional
- Business Intelligence
- BI Explained
- Developing a Data Dictionary
- BI Security
- Gathering BI Requirements
- Source System Extracts and Transforms
- ETL Mechanisms
- Business Intelligence Landscapes
- Business Intelligence Layouts and the Build or Buy Decision
- A Single Version of the Truth
- The Operational Data Store (ODS)
- Data Marts – Combining and Transforming Data
- Designing Data Elements
- The Enterprise Data Warehouse — Aggregations and the Star Schema
- On-Line Analytical Processing (OLAP)
- Data Mining
- Key Performance Indicators
- BI Presentation - Client Tools
- BI Presentation - Portals
- Implementing ETL - Introduction to SQL Server 2005 Integration Services
- Building a Business Intelligence Solution, Part 1
- Building a Business Intelligence Solution, Part 2
- Building a Business Intelligence Solution, Part 3
- Tips and Troubleshooting
- SQL Server and Microsoft Excel Integration
- Tips for the SQL Server Tools: SQL Server 2000
- Tips for the SQL Server Tools – SQL Server 2005
- Transaction Log Troubles
- SQL Server Connection Problems
- Orphaned Database Users
- Additional Resources
- Tools and Downloads
- Utilities (Free)
- Tool Review (Free): DBDesignerFork
- Aqua Data Studio
- Microsoft SQL Server Best Practices Analyzer
- Utilities (Cost)
- Quest Software's TOAD for SQL Server
- Quest Software's Spotlight on SQL Server
- SQL Server on Microsoft's Virtual PC
- Red Gate SQL Bundle
- Microsoft's Visio for Database Folks
- Quest Capacity Manager
- SQL Server Help
- Visual Studio Team Edition for Database Professionals
- Microsoft Assessment and Planning Solution Accelerator
- Aggregating Server Data from the MAPS Tool
I want to reiterate the purpose of Business Intelligence (BI) that I've been covering in this series on creating a Business Intelligence landscape. I'll hammer this home in most of the tutorials, since the definitions often vary throughout software vendors on the topic. My definition of Business Intelligence is a set of consolidated, aggregated, strategic data presented in an analytical format to upper management. One additional note – in all parts of the systems I'll describe in this series other than the source systems, users don't enter new data. I've seen the pros and cons of this process, and I stick with this tenant. That doesn't include, of course, meta-data involved with gathering the metrics or user selections for reports. What I'm talking about here is not allowing users to create new numbers within the system or alter the ones that are there. BI, by my definition, is an extended reporting system. Don't worry, we'll cover changes later.
Embedded within that BI definition are the core concepts of what we are learning to implement throughout this series. I've explained the sources where the data originates, and in the last tutorial I explained the Operational Data Store (ODS) which is next in line. At this point the system doesn't really fit my earlier definition. In a large enterprise there are far too many source systems for data to analyze using spreadsheets or in your head. Not only that, one site or plant might call "excess" one thing and another might figure that number a different way. The ODS will only contain data that is strategic to what its sources are, not for the entire enterprise. Although the reporting from an ODS might include some analytical elements, it is largely used for tactical, line-item reporting. And finally, the audience for an ODS isn't upper management, but management associated with its source data.
This isn't to say that you can't stop there and still have some level of Business Intelligence. Managers might pull data from the ODS or even the source systems to create their own analytical reports. The issues you run into when this happens is that since the managers aren't trained in data aggregation or data analytics, they can misinterpret the data. Not only that, upper management might not receive these reports, and so the interpretation is less strategic than it could be.
So we need another construct in the business to provide strategic, analytical data, but still have that data contain a bit more detail than is needed by the entire organization. For instance, does the CEO need to know which box a particular part was shipped in, or does the lead business owner need to know which chemical a particular scientist ordered on a certain day? Most often they don't. But if you omit this data, the region, area or district management might not get the level of detail they want. It seems that two separate systems are required for this need.
The first of these systems is the Data Mart. Again, we need to set a definition for a Data Mart since multiple vendors implement this reporting level differently. A Data Mart is a system that collects data from the ODS at a regional or functional level for strategic analysis.
The next level above that, which I'll cover in the next tutorial, is the Data Warehouse or the Enterprise Data Warehouse. While the Data Mart and the Data Warehouse are similar, the primary factors for determining when to split the data onto these systems is to answer the questions the business asked in the requirements gathering phase, and determine who the audience for the reports is. You'll find that different levels of detail are required for each of these systems.
So if it's just a matter of storing a little more detail, why not just use a single system? You certainly can do that, but the primary determination is the size of your organization. If you have a large organization, for performance reasons it's best to have the data between the two systems separated, and use two teams to manage and control them. Also, the farther out you get from the source the less detail you need to store and the less frequently you need to update the data.
Think about it this way: How often do you really make a strategic decision? Most decisions in our lives as well as our business are tactical. What to eat and what to wear on a daily basis is tactics. Whether you are a vegetarian and whether you purchase a formal or informal wardrobe is strategic. You don't buy a new wardrobe every day or decide at each meal whether you are a vegetarian or not.
The same holds true in business. How many parts to order or what supplier to use are tactical decisions, but decisions about what the firm produces as services or goods are strategic. You don't make the strategic decisions on data involving the details from today.
How much detail and what data refresh interval are other deciding factors on whether you're designing a Data Mart for a region or a Data Warehouse comprising them all.
We'll assume for this tutorial that you need a regional or functional break for the BI landscape.
Combining Data
The first part of creating the Data Mart is figuring out how to combine the data. You'll need two people for this exercise: the data architect and the business analyst. You're the data architect – you know database technology, the limits of the hardware, and how you can string together all the protocols, hard drives, software and the like to store and manage the data. The Business Analyst is there to help you find out, from the business, what the data means.
One of the greatest pitfalls I've seen in BI implementations is that technical people try to answer business questions with technology. You can't do that. The reason is that you don't know every part of your company's business if it is of any appreciable size. Your discipline is technology, not business. For you to combine data, you have to know what it means. Let's go back to that earlier example I mentioned regarding "excess". Excess is normally defined as the materials obtained for a process but not used. For instance, I order fifty pounds of rubber to create a tire, but I only use thirty pounds of it. Most business processes define the leftover 20 pounds as excess, if I don't have it destined for another tire.
But some businesses define excess as only those materials ordered, received, and paid for as excess. Still others include that the material is paid for by the company. Some manufacturing companies will contract other firms to create parts of the finished product. To save money, the larger firm will also pay for the parts the smaller firm uses. In this case, either firm might expense the excess, all depending on various choices.
You can see that the data architect won't have this kind of information. That's where you need to bring in the Business Analyst, who interviews the business to derive the process, and tell you what the data means.
But it goes farther than that. You should have a "Business Owner" for every data element you will store. Think of yourself as the bank. Your bank stores your money, moves it around when you tell them to, and tracks it for you. They will tell you how much you have in dollars, pesos and euros. What they won't do is tell you what that means. If you call the bank and ask "How much money do I have?" they'll answer you. But if you then ask them "Is that good?" they won't answer that. You should be the same way. Once your organization tells you what to store, you should understand everything there is to know about how that data got there, but you should refrain from making a call on what it means. Trust me on this one.
So how do you combine the data? I'll explain how to design data elements in the next tutorial, but the short answer is to begin with a series of business definitions. Create a glossary starting at the source system and work your way up to the top, all the time referring back to the requirements you gathered in the first phase. Along the way you'll notice that the users will begin to say words like "I want to know all of the ..." and "We need the complete view of..." or even "Everywhere I have X recorded..." The words All, Complete, and Everywhere are the keys to letting you know that you need to combine something.
Don't combine anything without an explanation from the Business Owner you appointed earlier. Record that information and the Business Owner's name and the date for your meta-data later.
Along the way your glossary will run into an issue where a data element (such as excess) will have the same name in two or more places but refer to different concepts. When that happens, go back to the Business Owners and ask them to select another name for the element that steers the furthest away from the accepted business term. Now you can combine at the proper level. The simple way of putting this is to call apples, apples; oranges, oranges; and the combination of them fruit. Expect a little friction here.
If you can't come to a meeting of the minds in this area, make separate table structures to store the data from various ODS systems, and use views to display them as one. At this point you aren't concerned with the physical design of the Data Mart – we'll come to that soon enough – but instead you are trying to determine what you are going to store and how it will be used. This is by far the bigger battle. Focus here on getting all of the same types of data together in one place.
The difference between combining data and transforming data is that in a transform you change the data. Combining doesn't change data; it just puts elements from disparate systems together.
Transforming Data
I've already explained the Extract, Transform and Load process a little in a previous tutorial, and I'll explain the mechanics of how you are going to bring the data in and combine and transform it in another tutorial. For now let's focus on the concepts.
Transforming the data is a similar process to combining it. Once again you'll need the Business Analyst to get the Business Owners to define the proper transformation. You'll find this quite frequently in currency, since it can be recorded in multiple ways.
It's at this point that you begin to change data from the source. If you are recording sales, for instance, then you'll have to come up with a new number in either pounds, euros, yen or dollars that wasn't there before. Make sure that you get that Business Owner's name and explanation before you start. Record this information in your glossary and meta-data. Every transform should be documented.
Note that a transform changes the data. You had dollars, you now have euros. You have one part number in system A, and when transformed to show how many parts there are called "X" you changed the number to be in line with system B. Some software vendors confuse combining data (where no changes are made to the data) with transforming the data (where changes are made). If you don't have the original value anymore, you have a transformation.
For numerical data, this is a straightforward mechanical process. Pick a conversion rate, and multiply it. Pick a markup, and add it. For part numbers or other mixed data, there are two basic methods to perform the transform.
The first is using mapping values. In this method, you leave the source data pure in one table, and then use joins to a tertiary entity to map the values. That allows a great deal of flexibility when you need to remap, but since we're talking about strategic reports, that's often a bad idea. It's confusing to see the headings on a report change month after month.
The other method is to pick a constant transform and apply a rule, transforming the data on the way in. This is a cleaner method, but isn't as flexible if the meaning changes later. In either case you need to document the method for each element in the glossary and the meta-data.
Earlier I mentioned that you may require a Data Warehouse in addition to a set of Data Marts. The physical storage concepts for these systems are similar, so in the next tutorial I'll explain how to design the data elements for the ODS, Data Marts and Data Warehouse.
After you learn about the data elements, I'll explain aggregation and the Star Schema you'll use for the data in the Data Warehouse tutorial.
Informit Articles and Sample Chapters
Luis Garcia did an article some time ago on Understanding Microsoft SQL Server 2000 Analysis Services, and in it he covers some Data Mart information.
Online Resources
Although there's absolutely nothing regarding Data Mart design on this site, it's a great example of a Data Mart in use.