0% found this document useful (0 votes)
24 views

DP 900T00A ENU PowerPoint - 02

Uploaded by

spergee101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

DP 900T00A ENU PowerPoint - 02

Uploaded by

spergee101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

2: Explore

fundamentals of
relational data in Azure

© Copyright Microsoft Corporation. All rights reserved.


Agenda

• Explore relational data concepts

• Explore Azure services for


relational data

© Copyright Microsoft Corporation. All rights reserved.


Learning objectives
After completing this module, you will be able to:

1 Identify characteristics of relational data.

2 Define normalization.

3 Identify types of SQL statements and relational database objects.

4 Identify options for Azure SQL services.

5 Identify options for open-source databased in Azure.

6 Provision a database service on Azure.

© Copyright Microsoft Corporation. All rights reserved.


1: Explore
relational data
concepts

© Copyright Microsoft Corporation. All rights reserved.


Relational tables
Customer
• Data is stored in ID FirstName MiddleName LastName Email Address City
tables 1 Joe David Jones [email protected] 1 Main St. Seattle

• Tables consists of 2 Samir Nadoy


[email protected] 123 Elm
New York
m Pl.
rows and columns
Product
• All rows have the
same columns ID Name Price

123 Hammer 2.99


• Each column is 162 Screwdriver 3.49

assigned a datatype 201 Wrench 4.25

Order LineItem
OrderNo OrderDate Customer OrderNo ItemNo ProductID Quantity

1000 1 123 1
1000 1/1/2022 1
1000 2 201 2
1001 1/1/2022 2 1001 1 123 2

© Copyright Microsoft Corporation. All rights reserved.


Normalization Customer
FirstNa LastNam
ID Address City
me e
1 Joe Jones 1 Main St. Seattle
123 Elm New
2 Samir Nadoy
Pl. York
Sales Data
Product
OrderN OrderDat Quantit
Customer Product Pric
o e y ID Name
e
1000 1/1/2022 Joe Jones, 1 Main St, Seattle Hammer ($2.99) 1
123 Hammer 2.99
Screwdriver
1000 1/1/2022 Joe Jones- 1 Main St, Seattle
($3.49)
2 Order Screwdrive
162 3.49
Samir Nadoy, 123 Elm Pl, New OrderN OrderDat Custome r
1001 1/1/2022 Hammer ($2.99) 2 o e r
York
201 Wrench 4.25
… … … … … 1000 1/1/2022 1
1001 1/1/2022 2
• Separate each entity into its own table
• Separate each discrete attribute into its
own column
LineItem
• Uniquely identify each entity instance
ItemN ProductI Quantit
(row) using a primary key OrderNo
o D y

• Use foreign key columns to link related 1000 1 123 1

entities 1000 2 201 2


1001 1 123 2

© Copyright Microsoft Corporation. All rights reserved.


Structured Query Language (SQL)
• SQL is a standard language for use with relational databases
• Standards are maintained by ANSI and ISO
• Most RDBMS systems support proprietary extensions of standard SQL
Data Definition Language Data Manipulation Language
Data Control Language (DCL)
(DDL) (DML)
CREATE, ALTER, DROP, RENAME GRANT, DENY, REVOKE INSERT, UPDATE, DELETE, SELECT

CREATE TABLE Product GRANT SELECT, INSERT, UPDATE SELECT Name, Price
( ON Product FROM Product
ProductID INT PRIMARY KEY, TO user1; WHERE Price > 2.50
Name VARCHAR(20) NOT NULL, ORDER BY Price;
Price DECIMAL NULL
);
Product
ID Name Price Name Price
Product
123 Hammer 2.99 Hammer 2.99
ID Name Price
162 Screwdriver 3.49 Screwdriver 3.49
201 Wrench 4.25 Wrench 4.25

© Copyright Microsoft Corporation. All rights reserved.


Other common database objects
Views Stored Procedures Indexes
Pre-defined SQL queries that Pre-defined SQL statements Tree-based structures that
behave as virtual tables that can include parameters improve query performance
CREATE VIEW Deliveries CREATE PROCEDURE RenameProduct CREATE INDEX idx_ProductName
AS @ProductID INT, ON Product(Name);
SELECT o.OrderNo, o.OrderDate, @NewName VARCHAR(20)
c.Address, c.City AS
FROM Order AS o JOIN Customer AS c UPDATE Product
ON o.Customer = c.ID; SET Name = @NewName
WHERE ID = @ProductID; ●
Custome Order ...
r … … … A-
Product
EXEC RenameProduct 201, 'Spanner'; M-Z
… … … … … … L ID Name Pric
… … … e
123 Hammer 2.99
Deliveries Product 162 Screwdrive 3.49
OrderDat r
OrderNo Address City ID Name Price
e 201 Spanner 4.25
201 Wrench Spanner 4.25
1000 1/1/2022 1 Main St. Seattle
1001 1/1/2022 123 Elm Pl. New York

© Copyright Microsoft Corporation. All rights reserved.


1: Knowledge check
1 Which one of the following statements is a characteristic of a relational database?
⃣All columns in a table must be of the same data type
⃣A row in a table represents a single instance of an entity
⃣Rows in the same table can contain different columns

2 Which SQL statement is used to query tables and return data?


⃣QUERY
⃣READ
⃣SELECT

3 What is an index?
⃣A structure that enables queries to locate rows in a table quickly
⃣A virtual table based on the results of a query
⃣A pre-defined SQL statement that modifies data

© Copyright Microsoft Corporation. All rights reserved.


1: Knowledge check
1 Which one of the following statements is a characteristic of a relational database?
⃣All columns in a table must be of the same data type
⃣A row in a table represents a single instance of an entity
⃣Rows in the same table can contain different columns

2 Which SQL statement is used to query tables and return data?


⃣QUERY
⃣READ
⃣SELECT

3 What is an index?
⃣A structure that enables queries to locate rows in a table quickly
⃣A virtual table based on the results of a query
⃣A pre-defined SQL statement that modifies data

© Copyright Microsoft Corporation. All rights reserved.


2: Explore Azure
services for relational
data

© Copyright Microsoft Corporation. All rights reserved.


Azure SQL
Family of SQL Server based cloud database services

SQL Server on Azure Azure SQL


Managed Instance Azure SQL Database
VMs

• Guaranteed compatibility to SQL • Near 100% compatibility with SQL • Core database functionality
Server on premises Server on-premises compatibility with SQL Server
• Customer manages everything – • Automatic backups, software • Automatic backups, software
OS upgrades, software upgrades, patching, database monitoring, patching, database monitoring,
backups, replication and other maintenance tasks and other maintenance tasks
• Pay for the server VM running • Use a single instance with • Single database or elastic pool to
costs and software licensing, not multiple databases, or multiple dynamically share resources
per database instances in a pool with shared across multiple databases
• Great for hybrid cloud or resources • Great for new, cloud-based
migrating complex on-premises • Great for migrating most on- applications
database configurations premises databases to the cloud

IaaS PaaS
© Copyright Microsoft Corporation. All rights reserved.
Azure Database services for open-source
Azure managed solutions for common open-source RDBMSs

Azure Database Azure Database for


Azure Database for MySQL for MariaDB PostgreSQL
• PaaS implementation of MySQL in • An implementation of the • Database service in the Microsoft
the Azure cloud, based on the MariaDB Community Edition cloud based on the PostgreSQL
MySQL Community Edition database management system Community Edition database
adapted to run in Azure
• Commonly used in Linux, Apache, engine
MySQL, PHP (LAMP) application • Compatibility with Oracle • Hybrid relational and object
architectures Database storage

PaaS

© Copyright Microsoft Corporation. All rights reserved.


2: Knowledge check
1 Which deployment option offers the best compatibility when migrating an existing SQL Server on-
premises solution?
⃣Azure SQL Database (single database)
⃣Azure SQL Database (elastic pool)
⃣Azure SQL Managed Instance

2 Which of the following statements is true about Azure SQL Database?


⃣Most database maintenance tasks are automated
⃣You must purchase a SQL Server license
⃣It can only support one database

3 Which database service is the simplest option for migrating a LAMP application to Azure?
⃣Azure SQL Managed Instance
⃣Azure Database for MySQL
⃣Azure Database for PostgreSQL

© Copyright Microsoft Corporation. All rights reserved.


2: Knowledge check
1 Which deployment option offers the best compatibility when migrating an existing SQL Server on-
premises solution?
⃣Azure SQL Database (single database)
⃣Azure SQL Database (elastic pool)
⃣Azure SQL Managed Instance

2 Which of the following statements is true about Azure SQL Database?


⃣Most database maintenance tasks are automated
⃣You must purchase a SQL Server license
⃣It can only support one database

3 Which database service is the simplest option for migrating a LAMP application to Azure?
⃣Azure SQL Managed Instance
⃣Azure Database for MySQL
⃣Azure Database for PostgreSQL

© Copyright Microsoft Corporation. All rights reserved.


© Copyright Microsoft Corporation. All rights reserved.

You might also like