Shrestha Rajat

Search

Search IconIcon to open search

Last updated Jul 9, 2023 Edit Source

# Cosmos DB

#cloud #Azure #databases

Azure SQL Database is a high-performance, reliable, fully managed, and secure relational database based on the latest stable version of the Microsoft SQL Server database engine provided by Azure.

Azure Cosmos DB is flexible as it stores data in atom-record-sequence (ARS) format which is then abstracted and projected as an API, which you specify when you’re creating your database. Your choices include SQL, MongoDB, Cassandra, Tables, and Gremlin. This allows the user to keep the native API (i.e. no changes to the application code).

# Managed Database engines:

Azure provides fully managed database capabilities for SQLServer, MySQL and PostgreSQL databases which provides the following benifits:

# Azure Database for MySQL

Azure Database for MySQL offers several service tiers, and each tier provides different performance and capabilities to support lightweight to heavyweight database workloads. You can build your first app on a small database for a few dollars a month, then adjust the scale to meet the needs of your solution. Dynamic scalability enables your database to transparently respond to rapidly changing resource requirements. You only pay for the resources you need, and only when you need them.

# Azure Database for PostgreSQL

Azure Database for PostgreSQL is a relational database service in the cloud. The server software is based on the community version of the open-source PostgreSQL database engine. Your familiarity with tools and expertise with PostgreSQL is applicable when you’re using Azure Database for PostgreSQL.

Azure Database for PostgreSQL is available in two deployment options: Single Server and Hyperscale (Citus).

Single Server All those capabilities require almost no administration, and all are provided at no additional cost. You can focus on rapid application development and accelerating your time to market rather than having to manage virtual machines and infrastructure. You can continue to develop your application with the open-source tools and platform of your choice, without having to learn new skills.

The Single Server deployment option offers three pricing tiers: Basic, General Purpose, and Memory Optimized. Each tier offers different resource capabilities to support your database workloads. You can build your first app on a small database for a few dollars a month, then adjust the scale to meet the needs of your solution. Dynamic scalability enables your database to transparently respond to rapidly changing resource requirements. You only pay for the resources you need, and only when you need them.

Hyperscale (Citus) The Hyperscale (Citus) option horizontally scales queries across multiple machines by using sharding. Its query engine parallelizes incoming SQL queries across these servers for faster responses on large datasets. It serves applications that require greater scale and performance, generally workloads that are approaching, or already exceed, 100 GB of data.

The Hyperscale (Citus) deployment option supports multi-tenant applications, real-time operational analytics, and high-throughput transactional workloads. Applications built for PostgreSQL can run distributed queries on Hyperscale (Citus) with standard connection libraries and minimal changes.

# Azure SQL Managed Instance (MI)

SQL Managed Instance (SQL MI) provides native Virtual Network (VNet) integration while Azure SQL Database enables restricted Virtual Network (VNet) access using VNET Endpoints and SQL MI also helps bridge the gap between Azure SQL Database and On-premises SQL Server due to being built on an instance scoped configuration model.

Azure SQL Managed Instance (MI) is similar to The Azure SQL-Database on the following topics: Management

  1. Backup
  2. Availability
  3. Host Accessibility
  4. License

However the key differences are: 1. Recovery model
Azure SQL Database: From automated backups only.
SQL MI: From automated backups and from full backups placed on Azure Blob Storage.

2. Active Geo-replication
SQL Database: Supported. In all service tiers other than Hyperscale.
SQL MI: Not supported. alternative solution is  Auto-failover groups.

3. Auto-failover groups
SQL Database: Supported. In all service tiers other than Hyperscale.
SQL MI: Supported.

4. Auto-scale
SQL Database: Only supported in Serverless model.
SQL MI: Not supported. You need to choose reserved compute and storage (vCore or max storage).

5. Automatic tuning (indexes)
SQL Database: Supported.
SQL MI: Not supported.

6. Elastic jobs
SQL Database: Supported.
SQL MI: Not supported.  SQL Agent can be used instead.

7. Long-term backup retention (LTR)
SQL Database: Supported. keep automatically taken backups up to 10 years.
SQL MI: Not supported yet. Manual backups as a temporary workaround.

8. Hyperscale architecture
SQL Database: Supported.
SQL MI: Not supported.

9. SQL Server Profiler
SQL Database: Not supported.
SQL MI: Supported.

10. Cross-database transactions
SQL Database: Not supported.
SQL MI: Supported.

11. Database mail (DbMail)
SQL Database: Not supported.
SQL MI: Supported.

12. Linked servers
SQL Database: Not supported.
SQL MI: Supported.

13. Service Broker
SQL Database: Not supported.
SQL MI: Supported.

14. SQL Server Agent
SQL Database: Not supported.
SQL MI: Supported.

15. SQL Server Auditing
SQL Database: Not supported.
SQL MI: Supported.

# REFERENCES:

https://medium.com/awesome-azure/azure-difference-between-azure-sql-database-and-azure-sql-managed-instance-sql-mi-2e61e4485a65#:~:text=SQL%20Managed%20Instance%20(SQL%20MI)%20provides%20native%20Virtual%20Network%20(,an%20instance%20scoped%20configuration%20model.

# Azure database documentation

# Migrating database workloads to Azure

# Working with Azure databases