Database - RDS, Dynamo, PostgreSQL, Aurora, MySQL, MariaDB, Elasticache Flashcards
RDS, Dynamo, PostgreSQL, Aurora, MySQL, MariaDB, Elasticache
What is a relational database?
a traditional database that is made up like a spreadsheet with tables, rows, and fields.
Name the database Types in AWS
SQL server Oracle MySQL Server PostgreSQL Aurora MariaDB
Describe how a non-relational database works
collection = table document = row key value pairs - fields
What is data warehousing?
It is used to pull in very large and complex data sets. Usutally used by management to do queries on data (such as current performance vs targets, etc.) It is used for business intelligence. Tools like Cognos, Jaspersoft, SQL Server Reporting Services, Oracle Hyperion, and SAP Netweaver.
What is OTLP?
Online Transaction Processing
What is OLAP?
Online Analytics Processing
How do OLAP and OTLP differ?
They differ in terms of queries you will run. OTLP example: 2120121 -pulls up a row of data such as NAME, Date, Address to deliver to, delivery status, etc. OLAP example: Pulls in large number of records. Net profit for EMEA and Pacific for the digital record product. Sum of radios sold in EMEA Sum of radios sold in pacific Unit cost of Radio in each region Sales price of each radio Sales price - unit cost
T or F data warehousing databases use the same type of architecture from a db perspective and infrastructure layer.
False data warehousing uses different type of architecture both from a DB perspective and infrastructure layer.
A web server that makes it easy to deploy, operate, and scale in memory cache in the cloud is called what?
Elasticache
T or F Elasticache improves the performance of web apps by allowing you to retrieve info from fast, managed, in-memory caches, instead of relying entirely on slower disk based databases.
True
Name the types of Elasticache:
Memcached and Redis
Name the two types of RDS backups for AWS:
Automated backups and DB snapshots
_____ allows you to recover your DB to any point in time within a retention period.
- Automated backups
- DB Snapshots
automated backups
These types of backups are done manually (user initiated)
- Automated backups
- snapshots
Snapshots
The retention period for autometed backups can be between _____ and ___ days.
- 1 and 5
- 1 and 35
- 1 and 100
- infinite
2) 1 and 35
Automated backups will take a full daily snapshot and will also store
____ logs during the day
transaction
T or F
When you do a recovery, AWS will first choose the most recent daily backup and then apply transaction logs relevant to that dayl. This allows you to do a point in time recovery down to a second, within the retention period.
True
T or F
Automated backups are disabled by default.
False
Automated backups are enabled by default
Where are automated backups stored?
S3
T or F
With automated backups, you get unlimited, free storage space in S3.
False.
You get free storage space = to the size of your DB.
T or F
Backups are taken every time a change is made to the DB.
false.
Backups are taken within a defined window.
T or F
During the backup window, storage IO may be suspended while your data is being backed up and you may experience elevated latency.
True
T or F
Snapshots are stored even after you delete the original RDS instance, unlike automated backups
True
T or F
Whenever you restore either an Automated backup or a manual snapshot, the restored version of the DB will be a new RDS instance with a new DNS endpoint.
True
_____ allows you to have an exact copy of your DB in another AZ
multi-az
T or F
AWS handles multi-AZ DB replciation for you, so when your prod DB is written to, this write will automatically be syncronized to the standby database.
True
T or F
IN the evnet of planned DB maintenance, DB intance failure, or an AZ failure, RDS will auto failover to the standby so that DB ops can resume quickly without administrative intervention.
True
T or F
Multi-AZ is for disaster recovery only
True
T or F
Multi-AZ is also designed to improve performance
False
It is not primarily used for improving performance. For performance improvement , you need read replicas.
Which DBes are types of multi-az databases:
- SQL server
- aurora
- oracle
- mysql
- postgreSQL
- mariaDB
All of the above
_________ allow you to have a read only copy of your production DB.
read replicas
Read replicas achieve syncronization from the primary DB by using ______ replication.
asyncronous
Why would you use read replicas for your DB?
You want to use read replicas when you have very read heavy db workloads.
Read replicas are availabe for the following DBes:
- SQL
- mysql
- postgreSQL
- mariDB
- aurora
mysql
postgreSQL
mariaDB
aurora
They are not available for SQL
T or F
read replicas are used for disaster recovery, not scaling.
false
read replicas are used for scaling, not DR
T or F
You must have automated backups turned on in order to deploy a read replica
True
You can have up to ____ read replica copies of any DB
5
T or F
You can have read replicas of read replicas
True, but you must watch latency
T or F
read replicas share DNS endpoints
False
each read replica will have its own DNS endpoint
T or F
You can have read replicas that have multi-AZ
True
T or F
you can create read replicas of multi-AZ source databses
True
T or F
read replicas can be promoted to be their own databses
true, but it breaks replication
T or F
you can’t have read replicas in another region
False
read relicas can be located in another region.
______ can be used to significantly improve latency and throughput for many read-heavy application workloads (such as social networking, gaming, media sharing, and Q&A portals or compute intensive workloads such as recommendation engines)
- magnetic storage
- elasticache
- load balancing
- container
Elasticache
_______ improves app performance by storing critical pieces of data in memory for low-latency access.
caching
T or F
cached info may include the results of IO intensive DB queries or the result of computationally intensive calculations.
True
A widely adopted memory object caching system. Elasticache is protocol compliant with _____, so popular tools that you use today with existing _____ environments will work seamlessly with the service.
memcached
A popular open source in-memory key-value store that supports data structures such as sorted sets and lists. Elasticache supports master/slace replication and multi-az, which can be used to achieve cross AZ redundancy.
Redis
Because of the replication and persistence features of ______, elasticache manages ______ more as a relational DB.
Redis
______ Elasticache clusters are managed as stateful entities tht include failover, similar to how Amazon RDS manages database failover.
Redis
Because _______ is designed as a pure coding solution with no persistence, Elasticache manages ______ nodes as a pool that can grow and shrink, similar to an EC2 ASG. Individual nodes are expendable and Elasticache provides additional capabilities here, such as auto node replacement and auto discovery.
memcached
Is object caching your primary goal, for example to offload your DB, if so, use this….
- memcached
- redis
memcached
are you interested in as simple caching model as possible? if so use this….
- memcached
- redis
memcached
Are you planning on running large cache nodes and require multi-threaded performance with utilization of multiple codes? if so use this….
- memcached
- redis
memcached
Do you want the ability to scale your cache horizontally as you grow, if so use this….
- memcached
- redis
memcached
are you looking for more advanced data types, such as lists, hashes, and sets? if so use this….
- memcached
- redis
redis
does sorting and ranking data sets in memory help you, such as with leaderboards? if so, use this…
- memcached
- redis
redis
is persistence of your key store important? if so, use this…
- memcached
- redis
redis
do you want to run with multiple AWS AZ with failover?
if so, use this…
- memcached
- redis
redis
______ is a fast and flexible NoSQL DB service for all apps that need consisten, single digit millisecond latency at any scale.
DynamoDB
_______ is a fully managed DB and supports both documents and key-value data models. Its flexible data model and reliable performance make it a great fir for mobile, web, gaming, ad-tech, IoT, many other apps.
DynamoDB
T or F
DynamoDB is stored on magnetic storage
False
DynamoDB is stored on SSD storage
DynamoDB is spread across ___ goegraphically distinc data centers
- 2
- 3
- 4
- 5
- 6
- 3
Which of these is the default for DynamoDB
Eventual Consistent reads
Strongly consisten reads
Eventual consistent reads
DynamoDB
Consistently across all copies of data is usually reached within a second. Repeating a red after a short time should return the updated data. Best read performance)
- Eventually consistent read
- Strongly consistent read
Eventually consistent read
DynamoDB
This returns a result that reflects all writes that received a successful response prior to the read.
- Eventually consistent read
- Strongly consistent read
Strongly consistent read
T or F
DynamoDB tables are made up of Items and Attributes
Items (think of a row of data in a table)
Attributes (Think of a column of data in a table)
True
T or F
DynamoDB supports key-value and document data structures
True
DynamoDB
The name of the data = ____
The data itself =_____
key
value
DocDB documents can be written in:
- JSON
- HTML
- HTTP
- XML
- JAVA
JSON
HTML
XML
DynamoDB stores and retrieves data based on a ______ key
primary
2 types of primary keys:
______ key and ____ key
partition and composite key
This Dynamo DB key is a unique attribute (userID) value of the part key is input to an internal hash function which determines the partition or physical location on which the data is stored.
partition key
T or F
If you are using the partition key as your primary key, then no two items can have the same partition key.
true
DynamoDB
The composite key is made up of the ____ key and the ____ key
partition and sort key
DynamoDB
Primary key can be a composite key consisting of _____ key and ___ key.
primary and sort
___key = user ID
____ key = timestamp of the past
partition and sort
T or F
DynamoDB
2 different items may have the same partition key, but they must have a different sort key.
True
T or F
DynamoDB Composite Key
All items with teh same partitionkey are stored together, then sorted according to the sort key value.
True
T or F
DynamoDB Composite key
Allows you to store multiple items with same partition key
True
T or F
DynamoDB Authentication and Access control is managed using AWS cognito
False
DynamoDB Authentication and Access control is managed using AWS IAM
T or F
YOu can create an IAM user within your AWS Account which has specific permissions to access and create DynamoDB tables.
True
T or F
You can create an IAM role which enables you to obtain temp access keys which can be used to access DynamoDB.
true
T or F
You can also use a special IAM condition to restrict user access to only their own records.
True
In SQL, and _____ is a data structure which allows you to perform fast queries on specific columns in a table. You select the columns that you want included in the ____ and run your searches on the _____ rather then on the entire dataset.
index
IN DynamoDB, there are 2 types of indexes that are supported to help speed up your DynamoDB queries:
_______Secondary index
______Secondary index
Local and Global
DynamoDB
This can only be created when you are creating your table
- Local secondary index
- Global secondary index
Local secondary index
DynamoDB
You can’t add, remove, or modify it later.
- local secondary index
- global secondary index
local secondary index
DynamoDB
It has the same partition key as your original table
- local secondary index
- global secondary index
local secondary index
DynamoDB
It uses a different sort key
local secondary index
global secondary index
local secondary index
DynamoDB
it gives you a differnt view of your data, organized according to an alternative sort key
local secondary index
global secondary index
local secondary index
DynamoDB
any queries based on this sort key are much faster using the index than the main table
local secondary index
global secondary index
local secondary index