You are on page 1of 85

© Copyright Microsoft Corporation. All rights reserved.

FOR USE ONLY AS PART OF VIRTUAL TRAINING DAYS PROGRAM. THESE MATERIALS ARE NOT AUTHORIZED FOR
DISTRIBUTION, REPRODUCTION OR OTHER USE BY NON-MICROSOFT PARTIES.
Agenda

Explore core data concepts

Explore roles and responsibilities in the world of data

Describe concepts of relational data

Explore concepts of non-relational data

Explore concepts of data analytics


Lesson 1: Explore core data concepts
Identify how data is defined and stored

Identify characteristics of relational and non-


relational data
Lesson 1
objectives

Describe and differentiate data workloads

Describe and differentiate batch and streaming


data
What is data?

Table
Transactional vs analytical data stores
Customer

CustomerID CustomerName CustomerPhone

Orders

OrderID CustomerID OrderDate


Transactional workloads
Account

CustomerID Balance

5558 1000
500

6023 1500
2000
Customer

CustomerID CustomerName CustomerPhone

Transfers

TransactionID FromAccount ToAccount Transaction OrderDate TransactionDescription


Amount

982801 6023 5558 500 DD/MM/YY Transfer 500 from


account 6023 to
Orders account

OrderID CustomerID OrderDate


Analytical System

On-premises data D ATA D ATA S TO R A G E D ATA D ATA


INGESTION PROCESSING V I S U A L I Z AT I O N

Cloud data

SaaS data
Batch Data / Streaming Data
Lesson 2: Explore roles and responsibilities in the world
of data
Explore data job roles

Lesson 2
objectives
Explore common tasks and tools for data job
roles
Roles in Data

Database Administrator Data Engineer Data Analyst


Database Management Data Pipelines and processes Provides insights into the data
Implements Data Security Data Ingestion storage Visual Reporting
Backups Prepare data for Analytics Modeling Data for Analysis
User Access Prepare data for analytical processing Combines data for visualization and analysis
Monitors performance
Common Tools – Database Administrator

Azure Data Studio SQL Server Management Studio Azure Portal / CLI

• Graphical interface for managing • Graphical interface for managing • Tools for management and
on-premises and cloud-based data on-premises and cloud-based data provisioning of Azure Data Services
services services • Manual and automation of scripts
• Runs on Windows, macOS, Linux • Runs on Windows using Azure Resource Manager or
• Comprehensive Database Command Line Interface scripting
Administration tool
Common Tools – Data Engineering

Azure Synapse Studio SQL Server Management Studio Azure Portal / CLI

• Azure Portal integrated to manage • Graphical interface for managing • Tools for management and
Azure Synapse on-premises and cloud-based data provisioning of Azure resources
• Data Ingestion (Azure Data Factory) services • Manual and automation of scripts
• Management of Azure Synapse • Runs on Windows using Azure Resource Manager or
assets (SQL Pools / Spark Pool) • Comprehensive Database Command Line Interface scripting
Administration tool
Common Tools – Data Analyst

Power BI Desktop Power BI Portal / Power BI Service Power BI Report Builder

• Data Visualization tool • Authoring and management of • Data Visualization tool for paginated
• Model and Visualize Data Power BI reports reports

• Management of Azure Synapse • Authoring of Power BI dashboards • Model and Visualize paginated reports
assets (SQL Pools / Spark Pool) • Share Reports / Datasets
Lesson 3: Describe concepts of relational data
Explore the characteristics of relational data

Define tables, indexes, and views


Lesson 3
objectives
Explore relational data workload offerings in
Azure
Tables

Customers
CustomerID CustomerName CustomerPhone
100 Muisto Linna XXX-XXX-XXXX
XXX-XXX-XXXX
101 Noam Maoz

XXX-XXX-XXXX
102 Vanja Matkovic

XXX-XXX-XXXX
103 Qamar Mounir

XXX-XXX-XXXX
104 Zhenis Omar

XXX-XXX-XXXX
105 Claude Paulet

XXX-XXX-XXXX
106 Alex Pettersen

XXX-XXX-XXXX
107 Francis Ribeiro
Normalization

Customers
CustomerID CustomerName CustomerPhone
100 Muisto Linna XXX-XXX-XXXX
Orders
XXX-XXX-XXXX
101 Noam Maoz OrderID CustomerName CustomerPhone

XXX-XXX-XXXX AD100 Noam Maoz XXX-XXX-XXXX


102 Vanja Matkovic
XXX-XXX-XXXX
AD101 Noam Maoz
XXX-XXX-XXXX
103 Qamar Mounir
XXX-XXX-XXXX
AD102 Noam Maoz
XXX-XXX-XXXX
104 Zhenis Omar
XXX-XXX-XXXX
AX103 Qamar Mounir
XXX-XXX-XXXX
105 Claude Paulet
XXX-XXX-XXXX
AS104 Qamar Mounir
XXX-XXX-XXXX
106 Alex Pettersen
XXX-XXX-XXXX
AR105 Claude Paulet

XXX-XXX-XXXX
MK106 Muisto Linna
Relations

Customers
CustomerID CustomerName CustomerPhone
100 Muisto Linna XXX-XXX-XXXX
Orders
XXX-XXX-XXXX
101 Noam Maoz OrderID CustomerID SalesPersonID
AD100 101 200
XXX-XXX-XXXX
102 Vanja Matkovic
AD101 101 200
XXX-XXX-XXXX AD102 101 200
103 Qamar Mounir
AX103 103 201
XXX-XXX-XXXX
104 Zhenis Omar AS104 103 201
AR105 105 200
XXX-XXX-XXXX
105 Claude Paulet
MK106 105 201
XXX-XXX-XXXX DB205 100 205
106 Alex Pettersen
Indexes

Customers
CustomerID CustomerName CustomerPhone
100 Muisto Linna XXX-XXX-XXXX
IDX-CustomerRegion
XXX-XXX-XXXX
101 Noam Maoz CustomerID Region
100 France
XXX-XXX-XXXX
102 Vanja Matkovic 101 Brazil
XXX-XXX-XXXX 102 Croatia
103 Qamar Mounir
103 Jordan
XXX-XXX-XXXX
104 Zhenis Omar 104 Spain
105 France
XXX-XXX-XXXX
105 Claude Paulet 106 USA
XXX-XXX-XXXX
106 Alex Pettersen
View

Customers
CustomerID CustomerName CustomerPhone
Orders
100 Muisto Linna XXX-XXX-XXXX
OrderID CustomerID SalesPersonID
XXX-XXX-XXXX
101 Noam Maoz AD100 101 200
AD101 101 200
XXX-XXX-XXXX
102 Vanja Matkovic AD102 101 200
XXX-XXX-XXXX AX103 103 201
103 Qamar Mounir
AS104 103 201
XXX-XXX-XXXX
104 Zhenis Omar AR105 105 200
MK106 105 201
XXX-XXX-XXXX
105 Claude Paulet DB205 100 205
XXX-XXX-XXXX
106 Alex Pettersen
Lesson 4: Explore concepts of non-relational data
Explore the characteristics of non-relational data

Define types of non-relational data


Lesson 4
objectives
Describe NoSQL, and the types of non-relational
databases
Explore characteristics of non-relational data
Entities

## Customer 1 ID: 1
Name: Mark Hanson
Telephone: [ Home: 1-999-9999999, Business: 1-888-8888888, Cell: 1-777- 7777777 ]
Address: [ Home: 121 Main Street, Some City, NY, 10110,
Business: 87 Big Building, Some City, NY, 10111 ]
## Customer 2 ID: 2
Title: Mr
Name: Jeff Hay
Telephone: [ Home: 0044-1999-333333, Mobile: 0044-17545-444444 ]
Address: [ UK: 86 High Street, Some Town, A County, GL8888, UK,
US: 777 7th Street, Another City, CA, 90111 ]
Identify non-relational database use cases
IoT and Telematics
Often require to ingest large amounts of data in frequent burst of activity, data is either semi structured or
structured, often requires real time processing

Retail and Marketing


Common scenarios for globally distributed data, document storage

Gaming
In-game stats, social media integration, leaderboards, low-latency applications

Web and Mobile


Common used with web click analytics, modern applications including bots
Types of non-relational data
What is semi-structured data?
What is unstructured data?
What is NoSQL?
What is a graph database?
What applications require a graph database?

Business requirements:
• OLTP apps with highly correlated data.
• Easy updates to single or many objects.
• Flexible data modelling.
• Data requirements that evolve.
• Hierarchical data structures.
Lesson 5: Explore concepts of data analytics
Learn about data ingestion and processing

Explore data visualization


Lesson 5
objectives

Explore data analytics


What is data ingestion?
What is data processing?
What is ETL?
What is ELT?
Explore Data Visualization

Power BI: A collection of software, services, apps, and connectors.


Explore Data Analytics

Descriptive Diagnostic Predictive

Prescriptive Cognitive
© Copyright Microsoft Corporation. All rights reserved.
© Copyright Microsoft Corporation. All rights reserved.
FOR USE ONLY AS PART OF VIRTUAL TRAINING DAYS PROGRAM. THESE MATERIALS ARE NOT AUTHORIZED FOR
DISTRIBUTION, REPRODUCTION OR OTHER USE BY NON-MICROSOFT PARTIES.
Agenda

Explore relational data offerings in Azure

Explore provisioning and deploying relational database offerings in


Azure

Query relational data in Azure


Lesson 1: Explore relational data offerings in Azure
Explore relational data offerings in Azure

Explore provisioning and deploying of relational


database offerings in Azure
Lesson 1
objectives
Query relational data in Azure
What are Azure Data Services?

SQL Server on Azure Azure SQL Azure SQL


Virtual Machines Managed Instance Database

Best for re-hosting and apps requiring Best for modernizing existing apps Best for building new apps in the cloud
OS-level access and control
Pre-provisioned or serverless compute
Automated manageability features and Offers high compatibility with SQL Server and Hyperscale storage to meet
OS-level access and native VNET support demanding workload requirements

Infrastructure as a Service Platform as a Service


SQL Server on Azure virtual machines

Customer challenge Key features Azure differentiators


I want to migrate to the cloud as fast as possible but SQL Server and OS server access Free Extended Security Updates for SQL
maintain operating system control and complete SQL Server 2008/R2
Server functionality Expansive SQL and OS versions
Automated Backups and Security
Windows, Linux, Containers
Updates
File stream, DTC, and Simple Recovery
Point in Time Restore with Azure Backup
model
Solution SSAS, SSRS, and SSIS Accelerated storage performance with
Get the combined performance, security, and analytics Azure Blob Caching
of SQL Server, backed by the flexibility, security, and 435 percent overall return on an Azure
hybrid connectivity of Azure IaaS investment over five years1
SQL Server on Azure VM Deployment choices
Marketplace pre-installed SQL Server on Windows or Linux
Deployment Choices Install your own SQL Server
Lift and Shift with Azure Migrate (Azure Site Recovery)

Unlock Licensing and Edition Flexibility


Resource Provider Automated Backups and Security Updates
Manage VMs through Azure SQL in portal

Memory or Storage optimized sizes for best performance Tempdb on local SSD
Sizes and Storage
Data and log on Premium Storage Managed Disks Ultra disks for extremely low latency needs
Performance Azure Blob Read Caching for data disks

Networking and Virtual Networks to integrate with on-premises


Security Advanced Data Security services (Preview)

Azure VM built-in HA Failover Cluster Instance with Azure Premium File Share
Azure Storage built-in DR Always On Availability Groups with Cloud Witness
HADR Azure Backup and Automated backups to Azure Blob Storage Hybrid Availability Group Secondary replicas
File-Snapshot Backups HADR on RedHat Linux with Pacemaker and fencing
IaaS vs PaaS

Business continuity Scale

High availability Advanced security

Automated backups Version-less

Long term backup retention Built-in monitoring

Geo-replication Built-in intelligence


Azure SQL DB

Customer challenge Key features Azure differentiators


I want to build modern apps, potentially multi- Single database or elastic pool Industry highest availability SLA of
tenanted, with the highest uptime and 99.995%
predictable performance Hyperscale storage (100TB+)
Industry only business continuity SLA
Serverless compute
with 5 second RPO and 30 second RTO
Fully managed service
Price-performance leader for mission-
Private link support critical workloads while costing up to 86
Solution High availability with AZ isolation percent less than AWS RDS (GigaOm)
Azure SQL Database is a highly scalable cloud
database service with built-in high availability
and machine learning
Azure SQL DB Service Tiers
General purpose Business critical Hyperscale*

Workloads that require low latency, Most business workloads with


Most business workloads fast recovery, and a readable highly scalable storage and read-
secondary scale requirements

Remote storage Local storage Local + remote storage


IOPS IOPS++ IOPS+
$ $$$ $$
Serverless* In-memory Unlimited storage

P P S S R P R R R R

*Not in managed instance


Azure SQL DB Managed Instance

Customer challenge Key features Azure differentiators


I want to migrate to the cloud, remove management Single instance or instance pool Near zero downtime migration using log
overhead, but I need instance-scoped features (Service shipping
Broker, SQL Server Agent, CLR…) SQL Server surface area (vast majority)
Fully managed business continuity with
Native virtual network support
failover groups
Fully managed service
Projected return on investment of 212
On-premise identities enabled with Azure percent over three years1
Solution AD and AD Connect
Managed instance combines leading security features The best of SQL Server with the benefits
with SQL Server compatibility and business model of a managed service
designed for on-premises customers
Managed Instance Service Tiers
General purpose Business critical

Workloads that require low latency,


Most business workloads fast recovery, and a readable
secondary

vCore model
Independent scalability

Remote storage Local storage


IOPS IOPS++
$ $$$
In-memory
Azure SQL Managed instance or DB

Azure SQL managed Azure SQL Database


instance

Single instance Instance pool Single database Elastic pool


SQL Server surface area Pre-provision compute Hyperscale storage (up to Resource sharing between
(vast majority) resources for migration 100TB) multiple databases to
Native virtual network Enables cost-efficient price optimize
Serverless compute
support migration. Simplified performance
Fully managed service
Fully managed service Ability to host smaller management for multiple
instances (2Vcore) databases

Currently in public preview Fully managed service


PostgreSQL, MariaDB, MySQL

PostgreSQL is the most MySQL is a leading open MariaDB is a community-developed


popular and wanted database source relational database for fork of MySQL with strong focus on
for modern apps LAMP stack apps the user community
Benefits of Azure Database for MySQL, PostgreSQL, MariaDB

Fully managed Built-in high availability Intelligent performance Industry-leading Integration with the
community database for lowest TCO and scale security and compliance Azure ecosystem

Take advantage of a fully Ensure your data is Improve performance Protect your data Build apps faster with
managed service while always available without with built-in intelligence with enhanced Azure services and
still using the tools and the need for additional and up to 16TB storage security features safeguard your
languages you're familiar costs and 20K IOPs including Advanced innovation with
with Threat Protection Azure IP Advantage
Azure Database for PostgreSQL

Azure builds upon


the core benefits of
PostgreSQL and
Open Source

Azure Database for PostgreSQL is


fully-managed, community PostgreSQL
The benefits of Azure Database for PostgreSQL
Build or migrate your workloads with confidence and optimized for value

Fully managed and Intelligent performance Flexible and open High performance
secure optimization scale-out with
Hyperscale

Single Server

Hyperscale
Lesson 2: Explore provisioning and deploying relational
database offerings in Azure
Provision relational data services

Configure relational data services


Lesson 2
objectives
Explore basic connectivity issues

Explore data security


What is provisioning?
Configure Relational Data Services

Basics Network Additional settings Tags (DB) Review & create


• Subscription connectivity • Data source (DB) • Terms and Privacy
• Resource group • Public vs Private access • Server Collation (MI)
• Managed Instance/ • VNet / Firewall rules • Database Collation (DB)
Server name • Connection type (MI) • Time zone (MI)
• Database Name (DB) • Opt-in for Advanced
• Admin Login data security (DB)
• Password
• Region
• Opt-in for pools (DB)
• Compute + storage
Connectivity and Firewalls
WEST US

mysqldbsrv.database.windows.net
GW GW
westus1-a.control.database.windows.net
104.42.238.205,1433 23.99.34.75

GW GW

proxy
GW

(1) redirect-find-db
GW GW

104.42.238.205

(2) redirect-query ..westus1-a.worker.database.windows.net


13.123.237.158, [11000 -11999]
Network Security – SQL Database
VNET Peering
• Allow access to Azure services
No access to Internet
• Firewall Rules
• Virtual Network Rules
• Private Link 127.33.201.5
10.0.0.3

174.17.218.16
10.0.0.2 10.0.0.5
mysqldbsrv.database
.windows.net

westus1-a.control.
mysqldbsrv.privatelink.
database.windows.net
database.windows.net
104.42.238.205
10.0.0.5
102.14.157.9
10.0.0.1

Vnet2Vnet P2S, S2S VPN Express Route On-premises


Authentication and Access Control
“Mixed Mode” authentication forced
SQL Auth for deployment: server admin
• Server-level principal for logical server for DB
• Member of sysadmin server role for MI
Need Windows Auth? Use Azure AD Authentication
Azure Managed Instance
• Azure AD Server Admin
• SQL or Azure AD Logins
• Database Users
• SQL Server Contained Database supported
Azure SQL Database
• Azure AD Server Admin
• SQL logins
• loginmanager and dbmanager roles for limited server admins
• Database Users
• Contained Database Users including Azure AD (recommended)
Azure Role Based Access Control (RBAC)
• All Azure operations for Azure SQL are controlled through RBAC
• Think of this as security rights outside the Managed Instance or Database
• Security principal and role-based system
• Scope includes subscription, resource group, and resource
• Decoupled from SQL Security (today)
• Applies to operations in Azure portal and CLI
• Allows for separation of duties for deployment, management, and usage
• Azure locks help protect resources from delete or read-only
• Built-in Azure SQL roles available to reduce need for owner

SQL DB SQL Managed SQL Security SQL Server


Contributor Instance Contributor Manager Contributor
Azure DB - read replicas
Read replicas help improve performance and scale of Create up to five replicas of the master server
read-intensive workloads such as BI and analytics
Consider the read replica features in scenarios when
delays in synching data between the master and
replicas are acceptable
Create a replica in a different Azure region from the
master for a disaster recovery plan, where a replica
replaces the master in cases of regional disasters Master server

Data storage on replica servers grows automatically


Asynchronous
without impacting workloads updates

Read Replica #1 Read Replica #2 Read Replica #3 Read Replica #4 Read Replica #5

Application BI and Dashboard


Analytics
Reporting
© Copyright Microsoft Corporation. All rights reserved.
© Copyright Microsoft Corporation. All rights reserved.
FOR USE ONLY AS PART OF VIRTUAL TRAINING DAYS PROGRAM. THESE MATERIALS ARE NOT AUTHORIZED FOR
DISTRIBUTION, REPRODUCTION OR OTHER USE BY NON-MICROSOFT PARTIES.
Demo: Provision an Azure SQL Database
Lesson 3: Query relational data in Azure
Describe query techniques for data using the
SQL language
Lesson 3
objectives
Query relational data
Introduction to SQL

• SQL is a standard language for use with relational databases


• SQL standards are maintained by ANSI and ISO
• Proprietary RDBMS systems have their own extensions of SQL such as
T-SQL, PL/SQL, pgSQL
SQL Statement types

DML DDL DCL

• Data Manipulation Language • Data Definition Language • Data Control Language

• Used to query and manipulate • Used to define database • Used to manage security
data
objects permissions
• SELECT, INSERT, UPDATE,
DELETE • CREATE, ALTER, DROP, • GRANT, REVOKE, DENY
REMOVE
Use DML statements

Statement Description
SELECT Select/read from a table
INSERT Insert new rows in a table
UPDATE Edit/Update existing rows in a table
DELETE Delete existing rows in a table
Elements of the SELECT Statement

Clause Expression
SELECT <select list>
FROM <table or view>
WHERE <search condition>
GROUP BY <group by list>
ORDER BY <order by list>
Example of SELECT statement

SELECT EmployeeId, YEAR(OrderDate) AS OrderYear


FROM Sales.Orders
WHERE CustomerId = 71
GROUP BY EmployeeId, YEAR(OrderDate)
HAVING COUNT(*) > 1
ORDER BY EmployeeId, OrderYear;
Example of INSERT statement

• The INSERT ... VALUES statement inserts a new row


INSERT INTO Sales.OrderDetails
(orderid, productid, unitprice, qty, discount)
VALUES (10255,39,18,2,0.05);

• Table and row constructors add multirow capability to INSERT ... VALUES

INSERT INTO Sales.OrderDetails


(orderid, productid, unitprice, qty, discount)

VALUES
(10256,39,18,2,0.05),
(10258,39,18,5,0.10);
Use DDL statements

Statement Description
CREATE Create a new object in the database, such
as a table or a view.
ALTER Modify the structure of an object. For
instance, altering a table to add a new
column.
DROP Remove an object from the database.
RENAME Rename an existing object.
Example of CREATE statement

CREATE TABLE Mytable


(Mycolumn1 int NOT NULL PRIMARY KEY, Mycolumn2
VARCHAR(50) NOT NULL , Mycolumn2 VARCHAR(10) NOT NULL
Query Tools
Query relational data in Azure SQL Database for PostgreSQL
Use PSQL to query a database

psql --host=<server-name>.postgres.database.azure.com --
username=<admin-user>@<server-name> --dbname=postgres
Query relational data in Azure SQL Database for MySQL
Use MySQL Workbench to query a database

You might also like