Databases

  • Relational DB
    • RDS
  • Non-relational DB
    • DynamoDB

OLTP vs OLAP

  • OLTP –> Online Transaction Processing
  • OLAP –> Online Analytical Processing

OLTP

  • An OLTP system captures and maintains transaction data in a database
  • Based on INSERT, UPDATE, DELETE commands
  • It emphasis is on fast processing i.e fast response time
  • And uses traditional DBMS.
  • Both Sql and No-Sql are used

OLAP

  • OLAP is an online analysis and data retrieving process
  • OLAP applies complex queries to large amounts of historical data, aggregated from OLTP databases and other sources, for data mining, analytics, and business intelligence projects.
  • Based on SELECT commands to aggregate data
  • Response time varies from seconds, minutes, or hours depending on the amount of data to process
  • And uses the data warehouse.
  • Redshift, Teradata, Amazon EMR, MapReduce

Amazon Neptune

  • Amazon Neptune supports popular graph models Property Graph and W3C’s RDF
  • Neptune powers graph use cases such as recommendation engines, fraud detection, knowledge graphs, drug discovery, and network security.

Amazon RDS

  • Amazon Relational Database Service
  • Provides you with six database engines
    • Amazon aurora, MarinaDB
    • Microsoft SQL Server
    • MySQl, PostgreSQL, Oracle
  • Aurora, Oracle –> has no free trail
  • Create Free tier Db
    • Easy create > PostgreSQL(any) > Free tier

Amazon Aurora

  • Amazon Aurora (Aurora) is a fully managed relational database engine that’s compatible with MySQL and PostgreSQL
  • 5 times faster than standard MySQL databases and
  • 3 times faster than standard PostgreSQL databases.

Multi AZs Replica

  • Currently we have a endpoints connected to a single DB
  • Multi AZs Replica allows us to one or two standby DB instances
    • The standby DB instances provide failover support
  • RDS > Databases > Select DB > Modify DB > Availability & durability
    • Creates a standby in a different Availability Zone (AZ) to provide data redundancy, eliminate I/O freezes, and minimize latency spikes during system backups.
  • Current and Standby DB will have the same Endpoints

Read Replicas

  • You are creating a replica DB instance from a source DB instance.
  • This new DB instance will have the source DB instance’s DB security groups and DB parameter groups.
  • Its like a Snapshot and can only perfrom read operation
  • Has different Endpoints because its entirly new DB
  • NOTE
    • In Multi-AZs Replica –> Read Replica may not be available

Amazon DynamoDB

  • Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.
  • It Offers
    • Serverless, Flexible Scheme, Horizontal Scaling
    • DynamoDB stream, DAX, Transactions
    • Backup, Global Tables
  • Its an alternate to MongoDB
    • But with more addidtiona feature
  • DB is called ad Table in NoSQL

Amazon DynamoDB Accelerator (DAX)

  • Fully managed, highly available, in-memory cache for Amazon DynamoDB
  • Its like a Caching-service for DynamoDB
  • Delivers up to a 10 times performance improvement
  • Pricing may br too high

AWS Caching Solutions

  • Amazon ElastiCache
    • Redis or Memcached is used
  • Amazon DynamoDB Accelerator (DAX)
    • In-memory cache for DynamoDB
  • Amazon CloudFront
    • Global content delivery network (CDN) service
    • Automatically routed to the nearest edge location
  • AWS Greengrass
  • Amazon Route 53

Amazon ElastiCache

  • Redis
    • In-memory data structure store used as database, cache and message broker.
    • ElastiCache for Redis offers Multi-AZ with Auto-Failover and enhanced robustness.
  • Memcached
    • High-performance, distributed memory object caching system, intended for use in speeding up dynamic web applications.

Secure In-memory DB

  • Redis authentication tokens, or passwords, enable Redis to require a password before allowing clients to run commands, thereby improving data security.

Understanding Database Sharding

  • Sharding is a database architecture pattern related to horizontal partitioning
  • Each partition has the same schema and columns, but also entirely different rows

Redshift

  • Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service in the cloud
  • Uses SQL to analyze structured and semi-structured data across data warehouses, operational databases, and data lakes