RDS 101

Relational Database Service

What is a Relational Database?

  • What most of us are used to
  • Traditional Spreadsheet:
    • Tables
    • Row
    • Fields (columns)

Relational Database Types

  • Microsoft SQL Server
  • Oracle
  • MySQL Server
  • PostgreSQL
  • Aurora
  • MariaDB

Nonrelational Databases

  • Collection = tables
  • Document = row
  • Key value pars = fields
  • JSON/NoSQL

What is Data Warehousing?

  • Used for business intelligence
  • Tools like Cognos, Jaspersoft, SQL server reporting services, oracle, hyperion, and SAP netweaver
  • Used to pull in very large and complex data sets
  • Usually used by management to do queries on data
  • Use a data warehouse separate from production DB for reporting

Online Transaction Processing vs Online Analytical Processing

  • OLTP
    • Order number 2120121
    • Pulls up row of data such as name, date, address to deliver to, delivery status
    • Happen much more frequently
    • Simple transactions
    • Insert into table this data
  • OLAP
  • Net profit for EMEA and Pacific for the Digital Radio Product
  • Pulls in large numbers of records
  • Sum of radios sold in EMEA
  • Sum of radios sold in Pacific
  • Unit cost of radio in each region
  • Sales price of each unit
  • Sales price - unit cost
  • Data warehousing database use different type of architecture both from a database perspective and infrastructure layer

Elasticache

  • Web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud
  • Improves the performance of web applications by allowing you to retrieve information from a fast, managed, in-memory cache
  • Instead of relying entirely on slower disk based databases
  • If you go to a store and want to see the top 10 items on sale, don't pull that from DB each time
    • Cache using elasticache to take the load off of the database
    • EXAM: whiat architectural changes can you make to help your DB run faster
      • Elasticache so they don't have to pull from DB each time
  • Supports
    • Memcached
    • Redis

Enhanced Monitoring

Amazon RDS provides metrics in real time for the operating system that your DB instance runs on. You can view the metrics for your DB instance using the console, or consume the Enhanced Monitoring JSON output from CloudWatch logs in a monitoring system of your choice. By default, Enahcnced monitoring metrics are stored in the CloudWatch logs for 30 days. To modify the amount of time the metrics are stored in CloudWatch logs, change t he retention for the RDSOSMetrics log group in the CloudWatch console.

Take note that there are certain differences between CloudWatch and Enhanced Monitoring Metrics. CloudWatch gathers metrics about CPU utilization from the hypervisor for a DB instance, and Enhanced Monitoring gathers its metrics from an agent on the instance. As a result, you might find differences between the measurements, because the hypervisor layer performs a small amount of work.

The differences can be greater if your DB instances use smaller instance classes because then there are likely more VMs that are managed by the hypervisor layer on a single physical instance. Enhanced Monitoring metrics are useful when you want to see how different processes or threads on a DB instance use the CPU.

Transparent Data Encryption

Amazon RDS supports using Transparent Data Encryption (TDE) to encrypt stored data on your DB instances running Microsoft SQL Server. TDE autmatically encrypts data before it is written to storage, and autmatically decrypts data when the data is read from storage.

To enable transparent data encryption for an RDS SQL Server DB instance, specify the TDE option in an RDS option group that is associated with that DB instance.

TDE for SQL Server provides encryption key management by using a two-tier key architecture. A certificate, which is generated from the database master key, is used to protect the data encryption keys. The database encryption key performs the actual encryption and decryption of data on the user database. Amazon RDS backs up and manages the database master key and the TDE certificate. To comply with several security standards, Amazon RDS is working to implement automatic periodic master key rotation.

Extras

  • RDS Periodic Backup retention period is 0-35 days
    • If you need to keep backups indefinitely:
      • Create a cron event in Cloudwatch that triggers Lambda function to take a snapshot
  • RDS Encryption only encrypts instances and snapshots at rest