Databases Flashcards

1
Q

What are the 6 relationship database (OLTP) flavors on AWS?

A
  1. SQL Server
  2. Oracle
  3. MySQL
  4. PostgreSQL
  5. Amazon Aurora
  6. MariaDB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two key features for RDS in AWS?

A
  1. Multi-AZ - for disaster recovery
  2. Read Replicas - for performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between multi-az and read replica?

A

Use multi az when you want to have a secondary database that will allow for immediate failover.

User read replica if you need to scale out reads for your material. You need to manually set different ec2 instances to read from each replica, there is no failover that is done automatically.

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

What is the primary difference between relational and nonrelational databases? What is amazons solution for nonrelational databases?

A

In non relational databases you can have any number of columns per row.

DynamoDB

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

What is data warehousing?

A

Used for business intelligence. Pull in large and complex datasets for analytics.

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

What is Online Transaction Process (OLTP) vs Online Analytics Processing (OLAP)?

A

OLTP is mostly for reads on data from databases.

OLAP is mostly aggregation / analyzing of data from databases.

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

What is Amazon’s data warehouse solution (for OLAP) called?

A

Redshift

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

What is ElastiCache?

A

Web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. Improves performance of web applications by allowing you to retrieve information from fast, managed in-memory caches instead of relying entirely on slower disk-based databases.

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

What is the difference between Redshift and ElastiCache?

A

Redshift is used for business intelligence or data warehousing. ElastiCache is to speed up performance of existing databases (frequently identical queries).

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

What are the two different types of methods for backups on RDS?

A
  1. Automated backups
  2. Database snapshots
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are automated backups?

A

allow you to recover the database to any point in time recovery within the “retention period”.

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

Where is the snapshot stored?

A

Within s3.

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

True or False. Database snapshots are stored manually.

A

True. They are user-initiated.

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

What is encryption at rest?

A

Encryption is done using the AWS key management service. The data stored at rest in the underlying storage is encrypted as are backups, read replicas, and database snapshots.

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

Can you SSH into your RDS instance?

A

No, you cannot log onto the RDS instance. It runs on virtual machines (even if you can’t see it, Amazon can). RDS is not serverless (Aurora is the exception to the rule).

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

What is Dynamo DB?

A

A fast and flexible NoSQL database service for all applications that need consistent, isngle-digit millisecond latency at any scale. It is a fully managed database and supports both document and key-value data models.

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

List the 4 basics of DynamoDB.

A
  • Stored on SSD storage
  • Spread across 3 geographically distinct data centers
  • Eventual Consistent Reads (default)
  • Strongly Consistent reads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is eventual consistent reads vs strongly consistent reads?

A

Eventual consistency reads is consistency across all copies of data is usually reached within a second.

Strong Consistent reads - returns a result that reflects all writes that are received a successful response prior to reading (< a second).

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

What is Redshift?

A

a fast and powerful, fully managed, petabyte-scale data warehouse service in the cloud.

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

What are the various configurations you can have for Redshift? 2 types.

A
  • single node (160 gb)
  • multi-node
    • leader node (manages client connections and receives queries)
    • compute node (store data and perform queries and computations. Up to 128 compute nodes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How much are you charged for leader node hours?

A

Nothing. Only charged for compute node hours.

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

True or False. Redshift is only available in one AZ.

A

True.

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

True or False. Redshift always attempts to maintain at least 5 copies of your data.

A

False. Redshift always attempts to maintain at least 3 copies of your data (the original and replica on the compute nodes and a backup in Amazon s3.)

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

True or False. Redshift can also asynchronously replicate your snapshots to s3 in another region for disaster recovery.

A

True.

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

What is Aurora?

A

MySQL and PostgreSQL compatible relational database engine that combines the speed and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases.

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

True or False. Aurora provides up to five times better performance than MySQL and three times better than PostgreSQL databases at a much lower price point, whilst delivering similar performance and availability.

A

True.

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

What does Aurora start with in terms of storage? What increments does it scale with?

A

10 GB and scales in 10 GB increment up to 64 TB.

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

What can the compute resources for Aurroa scale up to?

A

32 vCPUs and 244 GB of memory.

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

What kind of redudancy does Aurora provide?

A

2 copies of your data is contained in each availability zone, with a minimum of 3 availability zones. 6 copies of your data.

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

What is Aurora serverless?

A

On-demand, autoscaling configuration for the MySQL-compatible and PostgreSQL-compatible editions of Amazon Aurora. Automatically starts up, shuts down and scales capacity up or down based on your application’s needs.

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

What are the requirement(s) for read replicas?

A

must have backups turned on

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

What are the different qualities of read replicas? List 6

A
  • they can be multi-az
  • used to increase performance
  • must have backups turned on
  • can be in different regions
  • can be MySQL, PostgreSQL, MariaDB Oracle, Aurora
  • can be promoted to master, this will break the read replica
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What are the features for Multi AZ? List 2.

A
  • built mostly for failover (disaster recovery)
  • can force a failover from one AZ to another by rebooting the RDS instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What is ElastiCache?

A

A web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. Used to increase database and web application performance.

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

What are the two different in-memory caching engines supported by ElastiCache?

A
  • memcached
  • redis
36
Q

When do you use memcached vs redis?

A
  • memcached
    • scale out (horizontally, more quantity, not bigger)
    • simple caching tool
  • redis
    • ranking/sorting
    • multi-az
    • persistence
    • little more functionality
37
Q

True or False. Implementing Multi-AZ will help improve performance of the RDS instance.

A

False. Multi-AZ is only used for DR (disaster recovery).

38
Q

True or False. You can RDP / SSH into an RDS Instance.

A

False.

39
Q

True or False. With new RDS DB instances, automated backups are enabled by default.

A

True.

40
Q

In RDS, what is the maximum value I can set for my backup retention period?

A

35 days

41
Q

If I wanted to run a database on an EC2 instance, which of the following storage options would Amazon recommend?

  • RDS
  • S3
  • Glacier
  • EBS
A

EBS

42
Q

If you want your application to check RDS for an error, have it look for an ______ node in the response from the Amazon RDS API.

A

Error

43
Q

Which AWS DB platform is most suitable for OLTP?

A

RDS

44
Q

If you are using Amazon RDS Provisioned IOPS storage with a Microsoft SQL Server database engine, what is the maximum size RDS volume you can have by default?

A

16 TB

45
Q

Amazon’s ElastiCache uses which two engines?

A

Redis & Memcached.

46
Q

True or False. When you add a rule to an RDS DB security group, you must specify a port number or protocol.

A

False

47
Q

True or False. Amazon DynamoDB global tables provide a fully managed solution for deploying a multiregion, multi-master database, without having to build and maintain your own replication solution. With global tables you can specify the AWS Regions where you want the table to be available. DynamoDB performs all of the necessary tasks to create identical tables in these Regions and propagate ongoing data changes to all of them.

A

True.

48
Q

True or False. RDS with Multi-AZ is multi-master (can write to more than one DB at a time) and does span regions.

A

False. RDS with Multi-AZ is not multi-master (only one DB can be written to at a time) and does not span regions.

49
Q

True or False. Amazon EFS file systems in the Max I/O mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for file operations. You can also mount EFS filesystems to up to thousands of EC2 instances across multiple AZs.

A

True.

50
Q

True or False. You cannot create an encrypted Read Replica from an unencrypted master DB instance.

A

True.

51
Q

True or False. You also cannot enable encryption after launch time for the master DB instance.

A

True.

52
Q

True or False. DynamoDB is built for key-value data storage requirements and is also serverless and easily scalable. This is therefore a cost-effective solution for unpredictable workloads.

A

True.

53
Q

True or False. Amazon Aurora Global Database provides read access to a database in multiple regions – it does not provide active-active configuration with bi-directional synchronization (though you can failover to your read-only DBs and promote them to writable).

A

True.

54
Q

True or False. Amazon Athena with S3 cross-region replication is possible. Athena provides a transactional database solution, or active-active synchronization.

A

False. Amazon Athena with S3 cross-region replication is not suitable. This is not a solution that provides a transactional database solution (Athena is used for analytics), or active-active synchronization.

55
Q

True or False. Amazon DynamoDB global tables provide a fully managed solution for deploying a multi-region, multi-master database. It provides an active-active configuration where reads and writes can take place in multiple regions with full bi-directional synchronization.

A

True.

56
Q

True or False. AWS Database Migration Service (DMS) is used for data migration from a source to a destination. Not a multi-master database.

A

True.

57
Q

True or False. DynamoDB Streams help you to keep a list of item level changes or provide a list of item level changes that have taken place in the last 24hrs. Amazon DynamoDB is integrated with AWS Lambda so that you can create triggers—pieces of code that automatically respond to events in DynamoDB Streams.

A

True.

58
Q

True or False. An event source mapping (for DynamoDB streams) identifies a poll-based event source for a Lambda function. It can be either an Amazon Kinesis or DynamoDB stream. Event sources maintain the mapping configuration except for stream-based services (e.g. DynamoDB, Kinesis) for which the configuration is made on the Lambda side and Lambda performs the polling.

A

True.

59
Q

True or False. The in-memory caching provided by ElastiCache can be used to significantly improve latency and throughput for many read-heavy application workloads or compute-intensive workloads

A

True.

60
Q

What is Elasticache Memcached better than Redis for?

A
  • simple datat types
  • scaling up and out
  • multithreaded
61
Q

True or False. Sticky sessions, also known as session affinity, allow you to route a site user to the particular web server that is managing that individual user’s session. The session’s validity can be determined by a number of methods, including a client-side cookie or via configurable duration parameters that can be set at the load balancer which routes requests to the web servers. You can configure sticky sessions on Amazon ELBs.

A

True.

62
Q

True or False. In order to address scalability and to provide a shared data storage for sessions that can be accessible from any individual web server, you can abstract the HTTP sessions from the web servers themselves. A common solution to for this is to leverage an In-Memory Key/Value store such as Redis and Memcached.

A

True.

63
Q

True or False. Amazon Aurora Serverless does require you to make capacity decisions upfront as you do not select an instance type. As a serverless service it will need to know how to scale as needed.

A

False. Amazon Aurora Serverless does not require you to make capacity decisions upfront as you do not select an instance type. As a serverless service it will automatically scale as needed.

64
Q

True or False. An Aurora global database consists of one primary AWS Region where your data is mastered, and up to five read-only, secondary AWS Regions. Aurora replicates data to the secondary AWS Regions with typical latency of under a second. You issue write operations directly to the primary DB instance in the primary AWS Region.

A

True.

65
Q

What is Amazon DMS? Does it support only homogeneous migrations (Oracle to Oracle)?

A

AWS Database Migration Service helps you migrate databases to AWS quickly and securely. The source database remains fully operational during the migration, minimizing downtime to applications that rely on the database. The AWS Database Migration Service can migrate your data to and from most widely used commercial and open-source databases.

AWS Database Migration Service supports homogeneous migrations such as Oracle to Oracle, as well as heterogeneous migrations between different database platforms, such as Oracle or Microsoft SQL Server to Amazon Aurora. With AWS Database Migration Service, you can continuously replicate your data with high availability and consolidate databases into a petabyte-scale data warehouse by streaming data to Amazon Redshift and Amazon S3.

66
Q

True or False. You cannot create a cross-region Multi-AZ deployment with RDS

A

True.

67
Q

True or False. Amazon Data Lifecycle Manager to automatically create and manage snapshots is the best solution for high availability, when needing a reporting tool.

A

False. Amazon Data Lifecycle Manager to automatically create and manage snapshots is not the best solution for high availability when needing a reporting tool.

68
Q

True or False. Aurora Replicas are independent endpoints in an Aurora DB cluster, best used for scaling read operations and increasing availability.

A

True.

69
Q

True or False. Up to 25 Aurora Replicas can be distributed across the Availability Zones that a DB cluster spans within an AWS Region.

A

False. Up to 15 Aurora Replicas can be distributed across the Availability Zones that a DB cluster spans within an AWS Region.

70
Q

True or False. To increase availability, you can use Aurora Replicas as failover targets. That is, if the primary instance fails, an Aurora Replica is promoted to the primary instance.

A

True.

71
Q

True or False. With ElastiCache Memcached there is no data replication or high availability.

A

True. There is with Redis engine, however.

72
Q

True or False. Amazon Aurora Serverless is an on-demand, auto-scaling configuration for Amazon Aurora. The database automatically starts up, shuts down, and scales capacity up or down based on application needs. This is an ideal database solution for infrequently-used applications.

A

True.

73
Q

True or False. RedShift uses EC2 instances (it’s not serverless) so instances are running all the time even if the analytics is infrequent.

A

True.

74
Q

What port is MS SQL Server on?

A

1433

75
Q

True or False. DynamoDB offers consistent single-digit millisecond latency. However, DynamoDB + DAX further increases performance with response times in microseconds for millions of requests per second for read-heavy workloads.

The DAX cache uses cluster nodes running on Amazon EC2 instances and sits in front of the DynamoDB table

A

True.

76
Q

True or False. DynamoDB Read Replicas are significantly faster than RDS read replicas.

A

False. There’s no such thing as DynamoDB Read Replicas.

77
Q

True or False. You can use EC2 Auto Scaling with DynamoDB. You can also use Application Auto Scaling to scales DynamoDB.

A

False. You cannot use EC2 Auto Scaling with DynamoDB. You can use Application Auto Scaling to scales DynamoDB.

78
Q

True or False. ElastiCache in front of DynamoDB is a simpler implementation than DynamoDB DAX is.

A

False. DynamoDB DAX is a simpler implementation than ElastiCache in front of DynamoDB.

79
Q

True or False. You cannot encrypt your Amazon RDS instances and snapshots at rest by enabling the encryption option for your Amazon RDS DB instance when you create it.

A

False. You can encrypt your Amazon RDS instances and snapshots at rest by enabling the encryption option for your Amazon RDS DB instance when you create it.

80
Q

True or False. You cannot encrypt an existing DB, you need to create a snapshot, copy it, encrypt the copy, then build an encrypted DB from the snapshot.

A

True.

81
Q

True or False. Data that is encrypted at rest includes the underlying storage for a DB instance, its automated backups, Read Replicas, and snapshots.

A

True.

82
Q

True or False. A Read Replica of an Amazon RDS encrypted instance is also encrypted using the same key as the master instance when both are in the same Region. Even when in different Regions, a different key cannot be used.

A

False. A Read Replica of an Amazon RDS encrypted instance is also encrypted using the same key as the master instance when both are in the same Region. When in different Regions, a different key can be used.

83
Q

True or False. RedShift is a columnar data warehouse DB that is ideal for running long complex queries.

A

True.

84
Q

True or False. RDS can improve performance for repeat queries by caching the result and returning the cached result when queries are re-run.

A

False. RedShift can also improve performance for repeat queries by caching the result and returning the cached result when queries are re-run.

85
Q

True or False. Dashboard, visualization, and business intelligence (BI) tools that execute repeat queries see a significant boost in performance due to result caching in Redshift.

A

True.

86
Q

True or False. For RDS, you can’t modify an existing unencrypted Amazon RDS DB instance to make the instance encrypted, and you can’t create an encrypted read replica from an unencrypted instance.

A

True.