MIE1628 Big Data Analytics Lecture8
MIE1628 Big Data Analytics Lecture8
Data Analytics
Lecture 8
1
Azure SQL
Business Benefits
Azure SQL
Azure Data platform
Hybrid Cloud Off premises
On premises
Shared
Lower cost
Dedicated
Higher cost
Higher administration Lower administration
5
SQL Server on Azure virtual machines
6
Hybrid Deployment
7
Business Benefits of
Azure SQL VM
• Running SQL Server on virtual
machines allows you to meet unique
and diverse business needs through
a combination of on-premises and
cloud-hosted deployments, while
using the same set of server
products, development tools, and
expertise across these
environments.
8
Azure SQL Databases
Azure SQL DB
• Azure SQL Database is a PaaS
offering from Microsoft. You
create a managed database server
in the cloud, and then deploy your
databases on this server.
• A SQL Database server is a logical
construct that acts as a central
administrative point for multiple
single or pooled databases, logins,
firewall rules, auditing rules,
threat detection policies, and
failover groups.
10
Azure SQL DB
Elastic Pool
• In Elastic pool, multiple
databases can share the
same resources, such as
memory, data storage space,
and processing power
through multiple-tenancy.
• Elastic Pool enables you to
use the resources available in
the pool, and then release
the resources once
processing has completed.
11
Use cases
• Azure SQL Database is often used for:
• Modern cloud applications that need
to use the latest stable SQL Server
features.
• Applications that require high
availability.
• Systems with a variable load, that need
the database server to scale up and
down quickly.
12
Business Benefits of Azure SQL Database
Provides scalability
Azure SQL Database
features so that you can
automatically updates Provides high
increase the resources
and patches the SQL availability guarantees
available to store and
Server software
process data
Auditing tracks
Offers advanced threat
database events and Helps secure your data
protection provides
writes them to an audit by providing encryption
advanced security
log in your Azure
capabilities
storage account
13
Azure SQL Database
The developer’s intelligent cloud-database
service
17
Query Performance Insight
?
statistics available at your fingertips
• Allows you to easily identify and fix
performance issues in the minutes
Queries SQL Database
Enables the following scenarios:
• Finding regressed queries
• Identifying top resource consuming queries
• Ad-hoc workload optimization
• Smooth application upgrades
Deeper Insight
Protects and secures your app data
Identity
NEWë
• SQL threat analytics
• SQL auditing
Monitor activity
NEWë
• Row-level security
NEWë
• Dynamic data masking
Control access
NEWë
• Always encrypted
• Transparent data encryption
Protect data
• Secure development lifecycle
• Least vulnerable last 6 years
Secure Code
Azure Active Directory authentication
Manage user identities in one location.
Use Azure Active Directory user identities
and groups to enable access to Azure SQL Customer 1
SQL Database
Administer with SQL Server Management
Studio or SQL Server Data Tools
Dynamic data masking
Limit the exposure of sensitive data by hiding it from users
Table.PhoneNo
Encryption-in-transit Transport Layer Security (TLS) from the Protects data between the client and the server against snooping and
client to the server man-in-the-middle attacks. Azure SQL Database is phasing out Secure Sockets Layer
(SSL) 3.0 and TLS 1.0 in favor of TLS 1.2.
Encryption-at-rest Transparent Data Encryption (TDE) for Protects data on the disk. Key management is done by Azure, which makes it easier to
Azure SQL Database obtain compliance.
Encryption-end-to-end Always Encrypted for client-side Data is protected end-to-end, but the application is aware of encrypted columns. This is
column encryption used in the absence of data masking and TDE for compliance-related scenarios.
In-transit At-rest
End-to-end
Customer data Database files,
backups, Tx log,
TempDB
Overall Azure SQL Database Benefits
47% staff hours 75% faster 53% less 71% fewer cases
reclaimed for other app deployment cycles expensive than on- of unplanned
tasks DB management hours prem/hosted downtime
Other
Azure SQL
Database
“Now, those people can do “We can get things out faster with “To be able to do what we’re “The last time we had downtime, a
development and create more Azure SQL Database” doing in Azure, we’d need an half a day probably lost us $100k”
revenue opportunities for us.” investment of millions.”
27
Use cases for
Managed Instance
• Consider Azure SQL Database managed
instance if you want to lift-and-shift an
on-premises SQL Server instance and all
its databases to the cloud, without
incurring the management overhead of
running SQL Server on a virtual
machine.
28
Managed instance deployment enables a system
administrator to spend less time on administrative tasks.
29
PostgreSQL, MariaDB, and MySQL
30
• You get the following features with Azure
Database for MySQL:
• High availability features built-in.
Benefits of • Predictable performance.
• Easy scaling that responds quickly to
Azure demand.
31
• Azure Database for MariaDB delivers:
• Built-in high availability with no
additional cost.
• Predictable performance, using
Benefits of Azure inclusive pay-as-you-go pricing.
• Scaling as needed within seconds.
Database for • Secured protection of sensitive data
MariaDB at rest and in motion.
• Automatic backups and point-in-
time-restore for up to 35 days.
• Enterprise-grade security and
compliance.
32
• Azure Database for PostgreSQL has two
deployment options: Single-server and
Hyperscale.
• The single-server deployment option for
Azure
• Hyperscale (Citus) is a deployment
option that scales queries across
multiple server nodes to support large
33
Database for database loads.
• Azure Database for PostgreSQL is a highly
PostgreSQL
available service.
• It contains built-in failure detection and
failover mechanisms.
• Users of PostgreSQL will be familiar with
the pgAdmin tool, which you can use to
manage and monitor a PostgreSQL database.
You can continue to use this tool to connect
to Azure Database for PostgreSQL.
Migrate data
to Azure
34
NoSQL Azure Data
Stores
35
Big Data File Formats
Introducing Not Only SQL: No
Key/Value Column
Document Graph
Key-value store
• A query specifies the keys to identify the items to be retrieved. You can't search
on values. An application that retrieves data from a key-value store is responsible
for parsing the contents of the values returned.
Column family database
Flexible Indexing
Independent
Schema Support
Easy
JSON Ready Fast
Manipulation
Large
Version Proof ORM Free
Datasets
Azure Storage
Azure Table storage
44
Partitioning
45
Partitioning
46
• The primary advantages of using Azure Table Storage
tables over other ways of storing data include:
Use cases • It's simpler to scale. It takes the same time to
insert data in an empty table, or a table with
and Benefits billions of entries. An Azure storage account can
hold up to 500 TB of data.
of using • A table can hold semi-structured data
• There's no need to map and maintain the
Azure Table complex relationships typically required by a
normalized relational database.
Storage • Row insertion is fast
• Data retrieval is fast, if you specify the partition
and row keys as query criteria
47
Azure Blob storage
• Azure currently supports three different types of blob:
• Block blobs. A block blob is handled as a set of blocks.
Each block can vary in size, up to 100 MB. A block
blob can contain up to 50,000 blocks, giving a
maximum size of over 4.7 TB.
• Page blobs. A page blob is organized as a collection of
fixed size 512-byte pages. A page blob is optimized to
support random read and write operations; you can
fetch and store data for a single page if necessary. A
page blob can hold up to 8 TB of data.
• Append blobs. An append blob is a block blob
optimized to support append operations. You can
only add blocks to the end of an append blob;
updating or deleting existing blocks isn't supported.48
Azure Blob storage
49
Common uses of Azure Blob Storage include:
• Serving images or documents directly to a
Use cases browser, in the form of a static website.
and Benefits Visit Static website hosting in Azure
storage for detailed information.
of using • Storing files for distributed access
Azure Blob • Streaming video and audio
• Storing data for backup and restore,
Storage disaster recovery, and archiving
• Storing data for analysis by an on-
premises or Azure-hosted service
50
Azure Cosmos DB
51
Azure Cosmos DB
A globally distributed, massively scalable, multi-model database service
Column-family
Document
Key-value Graph
53
Azure
Cosmos DB
54
Use cases and Benefits of using Azure Cosmos
DB
Database
Container
Item
********.azure.com
Account
Database IGeAvVUp …
Container
Item
Database
Container
Item
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container User
Item Permission
Account
Database
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Item
Account
Database
Container
Collection Graph Table
Item
Document Vertices/Edges Row
Account
Database
Container
You can operate underlying items; these are the records stored in your database or rather in the container.
Account
Database
Container
The container also exposes a construct known as conflict-conflicts are used to resolve conflicts. These are going to be
exceptionally rare, however they are means for recovering records.
Well-defined consistency models
• Intuitive programming model
• 5 Well-defined, consistency models
• Overridable on a per-request basis
• Clear tradeoffs
• Latency
• Availability
• Throughput
Consistency Level Guarantees
Consistent Prefix Reads will never see out of order writes (no gaps).
Eventual Potential for out of order reads. Lowest cost for reads of all consistency levels.
Bounded-Staleness: Bounds are set server-side via the Azure Portal
Setting the Consistency Level in your
Cosmos DB account
81
References
• https://docs.microsoft.com/en-
us/azure/azure-sql/database/sql-database-
paas-overview
• https://docs.microsoft.com/en-
us/azure/cosmos-db/introduction
• https://docs.microsoft.com/en-
us/azure/storage/blobs/storage-blobs-
overview
82