Relational Data in Azure Flashcards
Type of cloud service:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?
SQL Server on Azure VMs - IaaS
Azure SQL Managed Instance - PaaS
Azure SQL Database - PaaS
Required user management:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?
SQL Server on Azure VMs - User must manage all aspects of the server (OS, SQL server updates/ configuration/backups/maintenance etc.)
Azure SQL Managed Instance - Not required to manage SQL updates, backups, recovery etc.
Azure SQL Database - Not required to manage SQL updates, backups, recovery etc.
Use cases:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?
SQL Server on Azure VMs - migrate or extend an on-premises SQL Server solution and retain full control over all aspects of server and database configuration.
Azure SQL Managed Instance - most cloud migration scenarios, particularly when you need minimal changes to existing applications.
Azure SQL Database - new cloud solutions, or to migrate applications that have minimal instance-level dependencies.
Azure SQL Database - Elastic Pool
Elastic pool - multiple databases share the same resources (memory, storage, processing power) via multiple-tenancy. These resources are known as the pool.
Useful if databases have resource requirements that vary over time.
Azure SQL Database - Single database
Single database allows a user to quickly set up and run a single SQL Server database. A user can scale the database if more storage space, memory or processing is required.
The primary use case for Azure database for MySQL, Azure database for MariaDB and Azure database for PostgreSQL
enable organizations that use them in on-premises apps to move to Azure quickly, without making significant changes to their applications.
Primary use case for Azure database for MySQL, Azure database for MariaDB and Azure database for PostgreSQL
The primary reason for these services is to enable organizations that use them in on-premises apps to move to Azure quickly, without making significant changes to their applications.
Azure Database for MySQL.
Azure Database for MySQL is a PaaS implementation of MySQL in the Azure cloud, based on the MySQL Community Edition.
Azure Database for MariaDB
Azure Database for MariaDB is an implementation of the MariaDB database management system adapted to run in Azure. It’s based on the MariaDB Community Edition.
Azure Database for PostgreSQL
is a PaaS implementation of PostgreSQL in the Azure Cloud. This service provides the same availability, performance, scaling, security, and administrative benefits as the MySQL service.
SQL-DDL
Data Definition Language - SQL commands to create, modify and remove tables and other objects in a database.
CREATE - create a new object
ALTER - Modify the structure of an object (e.g., alter a table to add a new column)
DROP - Remove an object from the database
RENAME - rename object
SQL - DCL
Data Control Language use to manage permissions for specific users or groups
GRANT - grant permission to perform a specific action(s)
DENY - deny permission to perform specific action(s)
REVOKE - remove an existing permission
SQL - DML
Data Manipulation Language are commands that manipulate rows in tables.
SELECT - Read rows from table
INSERT - Insert rows into a table
UPDATE - Modify data in existing rows
DELETE - Delete existing rows
SQL - WHERE
A WHERE clause is an important clause for DML statements.
SELECT, UPDATE and DELETE statements apply to EVERY ROW in the table unless a WHERE clause is provided.
SELECT * FROM customer; #return all rows
SELECT * FROM customer WHERE city = ‘Perth’; #return customers from the city of perth.
What is a view?
A view is a virtual table based on the results of a SELECT query.
CREATE VIEW Deliveries AS SELECT o.OrderNo, o.OrderDate, c.FirstName, c.LastName, c.Address, c.City FROM Order AS o JOIN Customer AS c ON o.Customer = c.ID;
A view can be queried and filtered much the same way as a table.
SELECT OrderNo, OrderDate, LastName, Address
FROM Deliveries
WHERE City = ‘Seattle’;