07 Databases Flashcards

1
Q

Describe the purpose of Relational Database Service (RDS).

A

Relational Database Service (RDS) provisions and manages database servers, allowing each server to run one or many databases.

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

List the supported database engines for RDS.

A

The supported engines for RDS include MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server.

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

How is database storage managed in RDS?

A

Database storage in RDS is managed using EBS, with each instance having its own dedicated volume.

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

Explain the concept of Multi-AZ in RDS.

A

Multi-AZ in RDS provides high availability by using a primary instance in one Availability Zone (AZ) that synchronously replicates to a stand-by instance in another AZ.

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

What happens during a failover in a Multi-AZ instance?

A

During a failover in a Multi-AZ instance, access to the database is redirected to the current primary instance, but there will be downtime while DNS records update and reach TTL.

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

Define the structure of a Multi-AZ Cluster in RDS.

A

A Multi-AZ Cluster in RDS consists of one writer instance that synchronously replicates to two reader instances in other AZs, allowing the reader instances to be used for read operations.

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

How are writes considered replicated in a Multi-AZ Cluster?

A

Writes in a Multi-AZ Cluster are considered replicated when they have been replicated to at least one reader instance.

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

What are the three types of endpoints used in a Multi-AZ Cluster?

A

The three types of endpoints are: the cluster endpoint (points to the writer), the reader endpoint (points to any available reader), and individual instance endpoints (not recommended for direct use).

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

Describe the backup process in RDS.

A

Backups in RDS capture the state of the database server and are stored in S3, with automated backups made on a schedule and snapshots created ad-hoc.

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

What is the difference between automated backups and snapshots in RDS?

A

Automated backups are scheduled and retained for up to 35 days, while snapshots are ad-hoc and retained until deleted.

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

How does Multi-AZ impact the backup process?

A

If Multi-AZ is enabled, backups are made from the stand-by instance to reduce performance impact on the primary instance.

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

Explain the frequency of transaction log captures in RDS.

A

Transaction logs in RDS are captured every 5 minutes to allow restoration to a precise time frame.

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

What is cross-region replication in RDS?

A

Cross-region replication in RDS can be enabled for backups and snapshots, allowing data to be replicated across different geographic regions.

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

How are restores performed in RDS?

A

Restores in RDS are performed by creating a new RDS instance based on the backup or snapshot.

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

Describe the purpose of promoting a read replica in RDS.

A

Promoting a read replica allows for a near-zero Recovery Time Objective (RTO), making it particularly helpful for cross-region disaster recovery.

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

How does RDS Proxy improve database performance?

A

RDS Proxy establishes long-term connections with clients and maintains a pool of connections to the database, which improves performance and helps avoid exhausting connections.

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

Define the role of IAM authentication in RDS.

A

IAM authentication is performed by calling GenerateDbAuthToken and mapping the IAM identity to a local RDS user for authorization.

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

Explain the significance of shared storage in Aurora.

A

Aurora uses shared storage instead of an EBS volume for each server, allowing data to be stored across three Availability Zones (AZs) for redundancy and enabling rapid provisioning of replicas.

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

What is the function of the cluster endpoint in an Aurora database?

A

The cluster endpoint is used for write and management operations within an Aurora database cluster.

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

How does Backtrack feature work in Aurora?

A

Backtrack allows in-place rewinds of the database without the need to restore to a brand new database.

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

Describe the cloning process in Aurora.

A

The Clone feature creates a new database that references another database and only stores changes, utilizing a copy-on-write mechanism.

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

What is the maximum number of read replicas that a write instance can have in RDS?

A

Each write instance can have a maximum of 5 read replicas.

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

How does RDS Custom differ from standard RDS?

A

RDS Custom allows for customization of the underlying operating system and database engine, enabling administrators to manually apply patches using SSH, SSM, or RDP.

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

Explain the concept of multi-master writes in Aurora.

A

Multi-master writes in Aurora allow multiple instances to write data simultaneously, requiring a quorum of replicas to agree upon receiving a write request.

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

What is the purpose of EBS volume encryption in RDS?

A

EBS volumes used by RDS can be encrypted using KMS to enhance data security, with some database engines natively supporting encryption.

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

Describe the replication method used by Read Replicas in RDS.

A

Read Replicas use asynchronous replication and can be created in other regions to enhance data availability.

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

What is the role of the reader endpoint in an Aurora cluster?

A

The reader endpoint in an Aurora cluster load balances read requests across the replicas.

28
Q

How does RDS Proxy ensure low-latency connections?

A

RDS Proxy is recommended for low-latency connections, such as those required by Lambda functions, by maintaining active connections to the database.

29
Q

What happens to the cost structure in recent versions of Aurora?

A

Recent versions of Aurora have shifted from a high water mark cost structure to a more scalable model.

30
Q

How many copies of data does Aurora store across multiple AZs?

A

Aurora stores 6 copies of the data across multiple Availability Zones (AZs) for redundancy.

31
Q

Describe how Aurora Serverless scales databases.

A

Aurora Serverless scales databases without directly provisioning instances, based on Aurora Capacity Units (ACUs).

32
Q

Explain the implications of scaling down to 0 in Aurora Serverless.

A

Scaling down to 0 will pause the database, which incurs an overhead cost.

33
Q

Define RDS Proxy in the context of Aurora Serverless.

A

Database connections in Aurora Serverless are managed through RDS Proxy.

34
Q

How does DynamoDB ensure high availability?

A

DynamoDB is a highly-available managed key-value NoSQL database.

35
Q

Describe the structure of tables in DynamoDB.

A

Tables in DynamoDB are a grouping of items that use the same primary key.

36
Q

What are the two types of primary keys in DynamoDB?

A

The two types of primary keys in DynamoDB are Simple (just the partition key) and Composite (a partition key and a sort key).

37
Q

Explain the uniqueness requirement of primary keys in DynamoDB.

A

The primary key must be unique in the table, whether it is simple or composite.

38
Q

How large can items be in DynamoDB?

A

Items in DynamoDB can be up to 400 KB each.

39
Q

Define the Provisioned capacity mode in DynamoDB.

A

Provisioned capacity mode allows setting a specific number of read capacity units (RCUs) and write capacity units (WCUs) on a per-table basis.

40
Q

What is the function of one RCU in DynamoDB?

A

One RCU performs strongly consistent reads up to 4 KB per second, which can be across multiple items in a single operation.

41
Q

Describe the function of one WCU in DynamoDB.

A

One WCU allows writing up to 1 KB per second, which can also be across multiple items in a single operation.

42
Q

Explain the concept of burst pool in DynamoDB.

A

Every table in DynamoDB has a burst pool of 300 seconds worth of RCUs and WCUs.

43
Q

What is the On-demand capacity mode in DynamoDB?

A

On-demand capacity mode allows DynamoDB to scale capacity automatically without any overhead except for storage.

44
Q

Define On-demand backups in DynamoDB.

A

On-demand backups are a point-in-time copy of the table, taken manually and stored until deleted, allowing restoration to the same or another region.

45
Q

What is Point-in-time Recovery in DynamoDB?

A

Point-in-time Recovery collects all changes made in a rolling 35-day window, allowing restoration to any point with one second granularity, and must be enabled on a per-table basis.

46
Q

Describe the Query operation in DynamoDB.

A

The Query operation retrieves data based on a single value of the primary key, and optionally a single value for the sort key or a rate.

47
Q

How does the Scan operation work in DynamoDB?

A

The Scan operation searches across the entire table and provides more flexible filtering options.

48
Q

Describe the consistency models available in DynamoDB.

A

DynamoDB offers eventually consistent reads by default, which are less expensive, allowing one RCU to read two items. Strong consistency can be selected when required.

49
Q

Define Local Secondary Index (LSI) in DynamoDB.

A

An LSI allows a different sort key with the same partition key and must be created when the table is set up. Up to 5 LSIs can be created, sharing capacity with the main table.

50
Q

How does a Global Secondary Index (GSI) differ from a Local Secondary Index (LSI)?

A

A GSI allows a different sort key and primary key, can be created at any time, and supports up to 20 per table. It uses separate RCUs and WCUs from the main table.

51
Q

Explain the purpose of Streams in DynamoDB.

A

Streams are time-ordered lists of changes to items in a table, retained for 24 hours, and can trigger Lambda functions for specific changes.

52
Q

What is DynamoDB Accelerator (DAX) and its primary benefit?

A

DAX is an in-memory cache that supports read-through and write-through caching, primarily benefiting read operations.

53
Q

Describe the functionality of Global Tables in DynamoDB.

A

Global Tables provide multi-master cross-region replication, allowing reads and writes in any region with conflict resolution using ‘last writer wins’.

54
Q

How does Time-to-Live (TTL) work in DynamoDB?

A

TTL can be applied to items to cause them to expire when the current epoch exceeds a specified attribute, with expired items deleted by a sweeper process.

55
Q

Define the role of Athena in relation to data stored in S3.

A

Athena performs ad-hoc queries on structured or unstructured data stored in S3 and CloudTrail, enabling flexible data analysis.

56
Q

Describe the types of data formats supported by Athena.

A

Athena supports various data formats including XML, JSON, and Parquet.

57
Q

Define the requirement for querying in Athena.

A

The schema must be defined within Athena before querying.

58
Q

How do federated queries enhance Athena’s capabilities?

A

Federated queries allow Athena to query non-S3 datasources using a data connector.

59
Q

What is Neptune and what are its features?

A

Neptune is a managed graph database that has features similar to RDS, such as MultiAZ and Point-In-Time Recovery (PITR).

60
Q

Explain the purpose of Quantum Ledger Database (QLDB).

A

QLDB provides a cryptographically-verifiable database with guaranteed transaction logging using blockchain technology.

61
Q

Describe ElastiCache and its use cases.

A

ElastiCache is a managed in-memory cache recommended for read-heavy workloads where low-latency is required.

62
Q

What engines does ElastiCache support?

A

ElastiCache supports the Redis, Memcached, and Valkey engines.

63
Q

How does Redis ensure high availability?

A

Redis supports Multi-AZ replication for high availability.

64
Q

Compare the performance characteristics of Redis and Memcached.

A

Redis supports advanced data structures and Multi-AZ replication, while Memcached can be more performant due to its support for multi-threading.

65
Q

What is a key difference between ElastiCache and DAX?

A

Unlike DAX, ElastiCache requires changes to the application.