Databases Flashcards
What are the RDS Database Types?
RDS: Relational Database Service
RDS Types: SQL Server, Oracle, MySQL, PostgreSQL,
MariaDB, and Amazon Aurora.
In what scenarios is RDS well-suited?
-
RDS Is for OLTP Workloads: Great for processing lots of small
transactions, like customer orders, banking transactions, payments, and booking systems. -
Not Suitable for OLAP
Use Redshift for data warehousing and OLAP tasks, like analyzing large amounts of data, reporting, and sales forecasting.
What is OLTP and OLAP?
OLTP: Stands for Online Transaction Processing. It refers to systems designed for managing and processing high volumes of real-time transactions, such as updating records, making reservations, or processing orders.
OLAP: Stands for Online Analytical Processing. It pertains to systems optimized for complex analytical queries and reporting. OLAP systems enable users to analyze large volumes of data, spot trends, and gain insights through aggregation and multidimensional analysis.
Read Replicas — Key Facts
-
Scaling Read Performance: Primarily used for scaling, not for disaster
recovery! - Requires Automatic Backup: Automatic backups must be enabled in order to deploy a read replica.
- Multiple Read Replicas Are Supported:MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server allow you to add up to 5 read replicas to each DB instance.
RDS Multi-AZ and Read Replicas
Multi-AZ:
- An exact copy of your production database in another Availability Zone.
- Used for disaster recovery.
- In the event of a failure, RDS will automatically failover to the standby
instance.
Read Replicas:
- A read-only copy of your primary database in the same Availability Zone, cross-AZ, or cross-region.
- Used to increase or scale read performance.
* Great for read-heavy workloads and takes the load off your primary database for read-only workloads (e.g., Business Intelligence reporting jobs).
4 Aurora Exams Tips
- 2 copies of your data are contained in each Availability Zone, with a minimum of 3 Availability Zones. 6 copies of your data.
- You can share Aurora snapshots with other AWS accounts.
- 3 types of replicas available: Aurora replicas, MySQL replicas, and PostgreSQL replicas. Automated failover is only available with Aurora replicas.
- Aurora has automated backups turned on by default. You can also take snapshots with Aurora. You can share these snapshots with other AWS accounts.
Aurora Serverless Use Cases
Aurora Serverless provides a relatively simple, cost-effective
option for infrequent, periodic, or unpredictable workloads.
4 Facts about DynamoDB
- Stored on SSD storage.
- Spread across 3 geographically distinct data centers.
- Eventually consistent reads (default).
- Strongly consistent reads.
What’s the difference between eventually consistent reads and
strongly consistent reads?
Eventually:
Consistency across all copies of data is usually reached within a second. Repeating a read after a short time should return the updated data. Best read performance. It reads from secondary nodes.
Strongly:
A strongly consistent read returns a result that reflects all writes that
received a successful response before the read. It reads straight from the leader node.
7 Facts on DynamoDB Transactions
- Multiple “all-or-nothing” operations
- Financial transactions
- Fulfilling orders
- 3 options for reads: eventual consistency, strong consistency, and transactional
- 2 options for writes: standard and transactional
- Up to 25 items or 4 MB of data
- DynamoDB transactions provide developers atomicity, consistency,
isolation, and durability (ACID) across one or more tables within a single
AWS account and region.
DynamoDB On-Demand Backup and Restore
- Full backups at any time
- Zero impact on table performance or availability
- Consistent within seconds and retained until deleted
- Operates within the same region as the source table
DynamoDB Point-in-Time Recovery
(PITR)
- Protects against accidental writes or deletes
- Restore to any point in the last 35 days
- Incremental backups
- Not enabled by default
- Latest restorable: 5 minutes in the past
How DynamoDB Streams works?
It’s like a real-time feed of the changes happening to the data in the table. Stored for 24 hours
- Changes in the Table: DynamoDB Streams captures those changes.
- Events: These changes are turned into small messages called “events.” Each event describes what changed, like which book was checked out or returned.
- Stream: These events are collected in a stream, which is like a flow of events. This stream is separate from the table itself but closely connected.
- Process the Events: You can have something called a “listener” that’s always paying attention to this stream.
Real-time Tracking: DynamoDB Streams provide real-time tracking of changes. This can be super useful for things like updating search results as soon as new data is added or keeping backups of changes.
What are Global Tables in DynamoDB used for?
Managed Multi-Master, Multi-Region Replication
- Globally distributed applications
- Based on DynamoDB streams
- Multi-region redundancy for disaster recovery or high availability
- No application rewrites
- Replication latency under one second. Strong consistent reads only in the same regions as writes.
- Last write wins is used for conflict resolution.
- DynamoDB streams should be enabled to enable Global tables
What is Amazon Keyspaces?
Amazon Keyspaces, formerly known as Amazon Managed Apache Cassandra Service (MCS), is a fully managed, serverless, and scalable database service offered by Amazon Web Services (AWS). It provides the benefits of Apache Cassandra’s NoSQL database technology without the operational overhead of managing and scaling the infrastructure yourself.
What is Amazon Neptune?
Amazon Neptune is a managed graph database service offered by Amazon Web Services (AWS). It’s designed for building applications that require storing, querying, and analyzing highly connected data, such as social networks, recommendation systems, fraud detection, and knowledge graphs.
What is Amazon QLDB?
Amazon Quantum Ledger Database (Amazon QLDB) is a fully managed, serverless, and highly scalable database. QLDB is designed to provide an immutable, transparent, and cryptographically verifiable ledger for applications that require a tamper-proof record of changes to data over time. It’s particularly useful for use cases like auditing, compliance, financial transactions, and supply chain tracking.
What is Amazon Timestream?
Amazon Timestream is a fully managed, serverless, and scalable time-series database service. It’s designed specifically for handling and analyzing large volumes of time-series data, which is data that is generated with a timestamp and often comes from sources like sensors, logs, metrics, and IoT devices.