Download PASS Community News

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Extensible Storage Engine wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational model wikipedia , lookup

Functional Database Model wikipedia , lookup

Clusterpoint wikipedia , lookup

Team Foundation Server wikipedia , lookup

Open Database Connectivity wikipedia , lookup

PL/SQL wikipedia , lookup

Database model wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Transcript
PASS Community News
June 2015
Planning on attending PASS Summit 2015? Start
saving today!
• The world’s largest gathering of SQL Server & BI professionals
• Take your SQL Server skills to the next level by learning from the world’s
top SQL Server experts, in over 190 technical sessions
• Over 5000 registrations, representing 2000 companies, from 52
countries, ready to network & learn
Save $150 right now using
discount code LC15MHD6
$1795
until July 12th, 2015
Upcoming SQLSaturdays
North America
International
• June 6
Colorado Springs
• June 6
Philadelphia
• June 6
Sri Lanka
• June 13
Houston
• June 6
Krasnodar
• June 13
Nova Scotia
• June 13 Rheinland
• June 13
South Florida
• June 13 Edinburgh (BI edition)
• June 27
Chattanooga
• June 20 Bratislava
• June 27
Vancouver
• June 20 Ica
Visit www.sqlsaturday.com to
register for a event near you!
Volunteering Opportunities
PASS would not exist without passionate, dedicated,
and hardworking volunteers from around the globe.
Volunteer today!!
For local opportunities please visit
volunteer.sqlpass.org
For PASS HQ related activities, please update the
“MyVolunteering” section of your MyPASS profile.
4
Stay Involved!
•
•
•
•
•
Sign up for a free membership today at sqlpass.org
Linked In:
http://www.sqlpass.org/linkedin
Facebook: http://www.sqlpass.org/facebook
Twitter:
@SQLPASS
PASS:
http://www.sqlpass.org
Arizona SQL Server Users Group
•
Linked In: Group name Arizona SQL Server Users Group (AZSSUG)
https://www.linkedin.com/grp/home?gid=6923535&sort=RECENT
•
Twitter:
@AZSSUGSQLPASS
•
PASS:
http://Arizona.sqlpass.org
•
Meetup: http://www.meetup.com/Arizona-SQL-Server-User-Group/
West Valley SQL Server Users Group
Learn about Microsoft SQL Server and the BI Stack
SQL Server – Overview
What is SQL Server - Database product by Microsoft
Today we ill be giving an overview of these components:
•
•
•
•
7
Database Engine (Administration & Development)
Integration Services
Analysis Services
Reporting Services
SQL Server Database Engine Overview
Tonight we will…
•
Walk through an RDBMS system (Tables, columns, entities, relationships)
• Discuss what an OLTP system is
• Discuss administering and developing for SQL server
**Examples from Adventure Works 2014**
8
Data is stored in tables
• Tables Store data in a tabular (column and row) format
• Tables represent logical Entities, such as a person or an address
Person Table
FirstName
Ken
Terri
Roberto
Rob
Gail
MiddleName
J
Lee
NULL
NULL
A
LastName
Sánchez
Duffy
Tamburello
Walters
Erickson
ModifiedDate
2009-01-07 00:00:00.000
2008-01-24 00:00:00.000
2007-11-04 00:00:00.000
2007-11-28 00:00:00.000
2007-12-30 00:00:00.000
Address Table
AddressLine1
1970 Napa Ct.
9833 Mt. Dias Blv.
7484 Roundtree Drive
9539 Glenside Dr
1226 Shoe St.
9
AddressLine2
NULL
NULL
NULL
NULL
NULL
City
Bothell
Bothell
Bothell
Bothell
Bothell
StateProvinceID
79
79
79
79
79
PostalCode
ModifiedDate
98011 2007-12-04 00:00:00.000
98011 2008-11-30 00:00:00.000
98011 2013-03-07 00:00:00.000
98011 2009-02-03 00:00:00.000
98011 2008-12-19 00:00:00.000
Primary Key
Field or fields that uniquely identify a row in a table
Should they be meaningful or meaningless? Opinions vary
AddressID AddressLine1
1 1970 Napa Ct.
2 9833 Mt. Dias Blv.
3 7484 Roundtree Drive
4 9539 Glenside Dr
5 1226 Shoe St.
1
0
AddressLine2
NULL
NULL
NULL
NULL
NULL
City
StateProvinceID PostalCode ModifiedDate
Bothell
79
98011 2007-12-04 00:00:00.000
Bothell
79
98011 2008-11-30 00:00:00.000
Bothell
79
98011 2013-03-07 00:00:00.000
Bothell
79
98011 2009-02-03 00:00:00.000
Bothell
79
98011 2008-12-19 00:00:00.000
Entities are related
• The Database structure is based on relationships between entities
• Business rules dictate this relationship
• Can a person have more than one address? Yes at Amazon. Maybe
no at your company
This relationship is indicated by a foreign key relationship between the
tables. The primary key field is stored on the relatedtable to indicate
the relationship.
1
1
Relationships can get complicated
This is the relationship between a person and an address in the
adventure works 2014 database
1
2
Online Transaction Processing (OLTP)
An OLTP system is a transactional system with real time data
interaction.
A system that a person interacts with in real time, like a bank website,
or an online classroom at GCU, are OLTP systems. The data is current
and constantly updated.
1
3
Other database configurations
•
•
•
•
Data Warehouse
Reporting Server
Archive Server
Data Mart
In these types of systems the data may be out of data by some amount
of time. They can be used to keep load off of a system, or perhaps a
system needs a subset of data from a different system. For example, a
mobile map system may only get location updates daily.
1
4
Administration and Development
•
•
•
•
•
•
•
1
5
Database architecture and design
Writing code (stored procedures, functions, triggers, etc.)
Optimization and Performance
Security
Backups
Installation and Setup
Change management and Deployment
Interacting with Data
T-SQL is the language used to interact with SQL Server. Based on ANSI
SQL standard.
Data Manipulation Language (DML): Interacts with the data
Data Definition Language (DDL): Defines objects
When creating a table, you are using DDL, when putting data into a
table, you are using DML
Basic DML Operations:
• Select – Gets data from a table
• Insert – Puts data into a table
• Update – Modifies data in a table
• Delete – Removes data from a table
1
6
SQL Server Management Studio (SSMS)
1
7
T-SQL Example
1
8
SQL Server Integration Services
What is Integration Services?
How do I get started using SSIS?
What is a Control Flow?
What is a Data Flow?
What are Source?
What are transformations?
1
9
Integration Services
2
0
Difference between Control Flow and
Data Flow
2
1
Sources,Destinations and
Transformations
2
2
Microsoft SQL Server Analysis Services
• What is Microsoft SQL Server Analysis
Services (SSAS)
• History of SSAS
• Purpose of SSAS
• Why and When implement SSAS
• Data Marts vs. Enterprise Data Warehouse's
(EDW’s)
• How to work with SSAS
• Query Language and Purpose
• What’s the future of SSAS?
23
What is Microsoft SQL Server Analysis Services (SSAS)
• SSAS is an OnLine Analytical Processing (OLAP), data mining and
reporting tool
• SSAS is used to analyze and make sense of information buried deep in
an organizations OnLine Transactional Processing database (OLTP)
• That’s why it’s called a ‘Data Base’, not an ‘Information Base’
• This data can possibly be spread out across multiple databases
• This data can reside in disparate tables
• Microsoft includes the following services in SQL Server related to
Business Intelligence (BI) and data warehousing:
• Integration Services
• Analysis Services
• Reporting Services
24
History of SSAS
• In 1996, Microsoft acquired Canada-based Panorama Software an
OLAP software technology company (codenamed Plato)
• In 1998, Microsoft released OLAP Services as part of SQL Server 7
(codename Sphinx)
• In 2000, Microsoft released Analysis Services 2000. It was renamed
from "OLAP Services" due to the inclusion of data mining services
(codename Shiloh)
• In 2005, Microsoft released the next generation of OLAP and data
mining technology as Analysis Services 2005 (codename Yukon)
• In 2008, Microsoft released Analysis Services 2008 (codename
Katmai)
• In 2012, Microsoft released Analysis Services 2012
25
Purpose of SSAS
•
An OLAP Cube deals with Historical or Archival Data
•
•
An OLAP Cube is characterized by relatively low volume of transactions
•
•
•
•
•
2
6
Sales by Region, Sales by Product Group, Sales by Quarter/Year
Speed
•
•
•
Typically read-only. Used for reporting, not transactions!
OLAP Queries tend to be very complex and involve aggregations
•
•
How much should WalMart give you when you return an item?
OLAP consists of three basic analytical operations: Consolidation (roll-up),
Drill-down, and Slicing and dicing.
Consolidation involves the aggregation of data that can be accumulated and
computed in one or more dimensions.
Drill-down is a technique that allows users to navigate through the details
Slicing and dicing is a feature whereby users can take out (slicing) a specific
set of data of the OLAP cube and view (dicing) the slices from different view
points.
Reduced pressure on the OLTP
Create a ‘Single Source of the Truth’
Why and When implement SSAS
• The top reasons for using SSAS are:
• You can build high-level aggregated reports and dashboards in seconds
• Users can generate their own reports with drag and drop capability
• You have the ability to centralize items such as key performance
indicators (KPIs).
• SSAS relieves the reporting burden from the OTAP
• Like any tool, SSAS is not always necessary (or even beneficial)
• If all your reports are simply listing Names and Addresses, listing
Products and current inventory level, etc…
2
7
Enterprise Data Warehouse's (EDW’s) and Data Marts
A Data Warehouse is:
“A relational database schema which stores historical data and
metadata from an operational system to facilitate the reporting and
analysis of the data, aggregated to various levels”.
A Data Warehouse contains the Entire Enterprises Data
A Data Mart is:
“The access layer of the data warehouse environment. The data mart is
a subset of the data warehouse which is usually oriented to a specific
business line or team.”
A Data Mart contains one group of the enterprises Data
So in short, a data warehouse contains many subject areas, and a data
mart as containing just one of those subject areas.
2
8
How to work with SSAS (2008, 2008R2)
Analysis Services is installed through the SQL Server Installation process
To create a new Analysis Services project, follow these steps:
1.
2.
3.
4.
5.
6.
2
9
Select Microsoft SQL Server 2008 > SQL Server Business Intelligence
Development Studio from the Programs menu to launch Business
Intelligence Development Studio (BIDS)
Select File > New > Project.
In the New Project dialog box, select the Business Intelligence Projects
project type.
Select the Analysis Services Project template.
Name the project and select a location to save it.
Click OK to create the new project.
http://www.codeproject.com/Articles/658912/Create-First-OLAP-Cube-in-SQL-Server-Analysis-Serv
3
0
How to work with SSAS (2012, 2014)
In SQL Server Data Tools (SSDT):
1. Click File, point to New, and click Project.
2. In the New Project dialog box, in the Project types pane, select
Business Intelligence Projects.
3. In the New Project dialog box, in the Visual Studio installed
templates category, select Analysis Services Project.
4. In the Name text box, type the name of the project. The name you
enter will be used as the default database name.
5. In the Location drop-down list, type or select the folder in which to
store the files for the project, or click Browse to select a folder.
6. To add the new project to the existing solution, in the Solution
drop-down list, select Add to Solution.
7. Click OK.
3
1
3
2
Query Language and Purpose
• The Query Language of an SSAS Cube is called MultiDimensional
eXpressions (MDX) language.
• While it is possible to translate some of these into traditional SQL, it
would frequently require the synthesis of clumsy SQL expressions
even for very simple MDX expressions.
• MDX has been embraced by a wide majority of OLAP vendors and
has become the standard for OLAP systems.
• MDX is used to:
•
•
•
3
3
Query the SSAS Cube to retrieve data from Analysis Services
MDX Expressions define default measures and defining security
MDX Functions order tuples in a set, count members of a dimension or
perform string manipulation
Simple MDX Query
SELECT Measures.[ Sales] ON COLUMNS,
[Product].[ Product Line]. MEMBERS ON ROWS
FROM [ProductsCube]
WHERE ([ Product].[ Color].[ Silver])
SELECT Measures.[ Sales] ON 0,
[Product].[ Product Line]. MEMBERS ON 1
FROM [ProductsCube]
WHERE ([ Product].[ Color].[ Silver])
SQL Equivalent:
SELECT SUM(T1.Sales) AS [Sales],
T2.Product Line,
T2.Color
FROM Sale.Sales AS T1
JOIN Product.Products AS T2
ON T1.ProductKey = T2.ProductKey
WHERE T2.Color = ‘Silver’
GROUP BY T2.Product Line, T2.Color
34
A Typical Cube
3
5
The BI Semantic Model
36
What’s the future of SSAS?
• PowerPivot
• Power View
• Tabular Model
•
Column Store Index
•
•
•
•
•
•
Power Query
Power Maps
Power BI Designer
In-Memory OLTP
Azure
HDInsight (Hadoop)
3
7
SQL Server Reporting Services
What is SQL Server Reporting Services?
SSRS is a server based report generating software.
This software allows developers to create graphical reports
from a set of data.
It allows the viewers an aggregated view of complex data
without manipulating raw data.
Reports can be published to a web reporting server.
3
8
SQL Server Reporting Services
How do I create a report?
All reports start with a dataset
From Raw Data
3
9
To an Organized Report
SQL Server Reporting Services
Setting up your Sources
Data Sources: Server and DB where the Dataset pulls information from
Datasets: This houses the query(or other data driver) that populates the report
Shared Data Sources: A Shared source can be used by all reports in the project, while the
Embedded source can only be used by the report in which it is created. Using a shared
Data Source make maintenance easier because only 1 source will need to be changed.
Reports: These are the reports that are tied to the project. If an embedded data source is
used, any changes would need to be made to each report to insure data integrity.
4
0
SQL Server Reporting Services
Reports in Action: Report Drill Through
Developers can link reports together and pass parameter
values to display details of the data that drives the aggregation.
4
1
SQL Server Reporting Services
Reports in Action: Report Drill Through
Clicking on the data field below will pass territory and group
parameters and only display this specific data in a new report.
4
2
SQL Server Reporting Services
Benefits of SSRS:
Drill down feature allows users to see the data behind the
aggregations.
Reports are published to a report server for easy categorization
and viewing.
Reports can be run and sent through an automatic
subscription.
They can be tied to security roles.
Customizable to include branding, graphs, and KPI’s.
4
3
Thank you for coming and please
come next month to the
West Valley SQL Server Users group