Relational Data in Azure Flashcards

1
Q

Type of cloud service:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?

A

SQL Server on Azure VMs - IaaS
Azure SQL Managed Instance - PaaS
Azure SQL Database - PaaS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Required user management:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Use cases:
SQL Server on Azure VMs ?
Azure SQL Managed Instance ?
Azure SQL Database ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Azure SQL Database - Elastic Pool

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Azure SQL Database - Single database

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The primary use case for Azure database for MySQL, Azure database for MariaDB and Azure database for PostgreSQL

A

enable organizations that use them in on-premises apps to move to Azure quickly, without making significant changes to their applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Primary use case for Azure database for MySQL, Azure database for MariaDB and Azure database for PostgreSQL

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Azure Database for MySQL.

A

Azure Database for MySQL is a PaaS implementation of MySQL in the Azure cloud, based on the MySQL Community Edition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Azure Database for MariaDB

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Azure Database for PostgreSQL

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SQL-DDL

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SQL - DCL

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SQL - DML

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SQL - WHERE

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a view?

A

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’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SQL - What is a stored procedure?

A

SQL statements that can be run on command. Stored procedures are used to encapsulate programmatic logic in a database for actions that applications need to perform when working with data.

CREATE PROCEDURE RenameProduct
	@ProductID INT,
	@NewName VARCHAR(20)
AS
UPDATE Product
SET Name = @NewName
WHERE ID = @ProductID;

EXEC RenameProduct 201, ‘Spanner’;

16
Q

SQL - What is an index?

A

An index helps you search for data in a table. When you create an index in a database, you specify a column from the table, and the index contains a copy of this data in a sorted order, with pointers to the corresponding rows in the table.

CREATE INDEX idx_ProductName
ON Product(Name);