Database Services Flashcards

1
Q

In a relational database, a row may also be called what? (Choose two.)
Record
Attribute
Tuple
Table

A

A, C. Different relational databases use different terminology. A row, record, and tuple all describe an ordered set of columns. An attribute is another term for column. A table contains rows and columns.

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

What must every relational database table contain?
A foreign key
A primary key
An attribute
A row

A

C. A table must contain at least one attribute or column. Primary and foreign keys are used for relating data in different tables, but they’re not required. A row can exist within a table, but a table doesn’t need a row in order to exist.

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

Which SQL statement would you use to retrieve data from a relational database table?
QUERY
SCAN
INSERT
SELECT

A

D. The SELECT statement retrieves data from a table. INSERT is used for adding data to a table. QUERY and SCAN are commands used by DynamoDB, which is a nonrelational database.

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

Which relational database type is optimized to handle multiple transactions per second?
Offline transaction processing (OLTP)
Online transaction processing (OLTP)
Online analytic processing (OLAP)
key/value store

A

B. Online transaction processing databases are designed to handle multiple transactions per second. Online analytics processing databases are for complex queries against large data sets. A key/value store such as DynamoDB can handle multiple transactions per second, but it’s not a relational database. There’s no such thing as an offline transaction processing database.

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

How many database engines can an RDS database instance run?
Six
One
Two
Four

A

B. Although there are six database engines to choose from, a single database instance can run only one database engine. If you want to run more than one database engine, you will need a separate database instance for each engine.

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

Which database engines are compatible with existing MySQL databases? (Choose all that apply.)
Microsoft SQL Server
MariaDB
Aurora
PostgreSQL

A

B, C. MariaDB and Aurora are designed as binary drop‐in replacements for MySQL. PostgreSQL is designed for compatibility with Oracle databases. Microsoft SQL Server does not support MySQL databases.

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

Which storage engine should you use with MySQL, Aurora, and MariaDB for maximum compatibility with RDS?
MyISAM
XtraDB
InnoDB
PostgreSQL

A

C. InnoDB is the only storage engine Amazon recommends for MySQL and MariaDB deployments in RDS and the only engine Aurora supports. MyISAM is another storage engine that works with MySQL but is not compatible with automated backups. XtraDB is another storage engine for MariaDB, but Amazon no longer recommends it. The PostgreSQL database engine uses its own storage engine by the same name and is not compatible with other database engines.

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

Which database engine supports the bring‐your‐own‐license (BYOL) model? (Choose all that apply.)
Oracle Standard Edition Two
Microsoft SQL Server
Oracle Standard Edition One
PostgreSQL

A

A, C. All editions of the Oracle database engine support the bring‐your‐own‐license model in RDS. Microsoft SQL Server and PostgreSQL only support the license‐included model.

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

Which database instance class provides dedicated bandwidth for storage volumes?
Standard
Memory optimized
Storage optimized
Burstable performance

A

B. Memory‐optimized instances are EBS optimized, providing dedicated bandwidth for EBS storage. Standard instances are not EBS optimized and top out at 10,000 Mbps disk throughput. Burstable performance instances are designed for development and test workloads and provide the lowest disk throughput of any instance class. There is no instance class called storage optimized.

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

If a MariaDB database running in RDS needs to write 200 MB of data every second, how many IOPS should you provision using io1 storage to sustain this performance?
12,800
25,600
200
16

A

A. MariaDB has a page size of 16 KB. To write 200 MB (204,800 KB) of data every second, it would need 12,800 IOPS. Oracle, PostgreSQL, or Microsoft SQL Server, which all use an 8 KB page size, would need 25,600 IOPS to achieve the same throughput. When provisioning IOPS, you must specify IOPS in increments of 1,000, so 200 and 16 IOPS—which would be woefully insufficient anyway—are not valid answers.

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

Using general‐purpose SSD storage, how much storage would you need to allocate to get 600 IOPS?
200 GB
100 GB
200 TB
200 MB

A

A. General‐purpose SSD storage allocates three IOPS per gigabyte, up to 10,000 IOPS. Therefore, to get 600 IOPS, you’d need to allocate 200 GB. Allocating 100 GB would give you only 300 IOPS. The maximum storage size for gp2 storage is 16 TB, so 200 TB is not a valid value. The minimum amount of storage you can allocate depends on the database engine, but it’s no less than 20 GB, so 200 MB is not valid.

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

If you need to achieve 12,000 IOPS using provisioned IOPS SSD storage, how much storage should you allocate, assuming that you need only 100 GB of storage?
There is no minimum storage requirement.
200 GB
240 GB
12 TB

A

C. When you provision IOPS using io1 storage, you must do so in a ratio no greater than 50 IOPS for 1 GB. Allocating 240 GB of storage would give you 12,000 IOPS. Allocating 200 GB of storage would fall short, yielding just 10,000 IOPS. Allocating 12 TB would be overkill for the amount of storage required.

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

What type of database instance only accepts queries?
Read replica
Standby database instance
Primary database instance
Master database instance

A

A. A read replica only services queries and cannot write to a database. A standby database instance in a multi‐AZ deployment does not accept queries. Both a primary and a master database instance can service queries and writes.

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

In a multi‐AZ deployment using Oracle, how is data replicated?
Synchronously from the primary instance to a read replica
Synchronously using a cluster volume
Asynchronously from the primary to a standby instance
Synchronously from the primary to a standby instance

A

D. Multi‐AZ deployments using Oracle, PostgreSQL, MariaDB, MySQL, or Microsoft SQL Server replicate data synchronously from the primary to a standby instance. Only a multi‐AZ deployment using Aurora uses a cluster volume and replicates data to a specific type of read replica called an Aurora replica.

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

Which of the following occurs when you restore a failed database instance from a snapshot?
RDS restores the snapshot to a new instance.
RDS restores the snapshot to the failed instance.
RDS restores only the individual databases to a new instance.
RDS deletes the snapshot.

A

A. When you restore from a snapshot, RDS creates a new instance and doesn’t make any changes to the failed instance. A snapshot is a copy of the entire instance, not just a copy of the individual databases. RDS does not delete a snapshot after restoring from it.

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

Which Redshift distribution style stores all tables on all compute nodes?
EVEN
ALL
KEY
ODD

A

B. The ALL distribution style ensures every compute node has a complete copy of every table. The EVEN distribution style splits tables up evenly across all compute nodes. The KEY distribution style distributes data according to the value in a specified column. There is no distribution style called ODD.

17
Q

Which Redshift node type can store up to 326 TB of data?
Dense memory
Leader
Dense storage
Dense compute

A

D. The dense compute type can store up to 326 TB of data on magnetic storage. The dense storage type can store up to 2 PB of data on solid state drives. A leader node coordinates communication among compute nodes but doesn’t store any databases. There is no such thing as a dense memory node type.

18
Q

Which is true regarding a primary key in a nonrelational database? (Choose all that apply.)
It’s required to uniquely identify an item.
It must be unique within the table.
It’s used to correlate data across different tables.
Its data type can vary within a table.

A

A, B. In a nonrelational database, a primary key is required to uniquely identify an item and hence must be unique within a table. All primary key values within a table must have the same data type. Only relational databases use primary keys to correlate data across different tables.

19
Q

In a DynamoDB table containing orders, which key would be most appropriate for storing an order date?
Partition key
Sort key
Hash key
Simple primary key

A

B. An order date would not be unique within a table, so it would be inappropriate for a partition (hash) key or a simple primary key. It would be appropriate as a sort key, as DynamoDB would order items according to the order date, which would make it possible to query items with a specific date or within a date range.

20
Q

When creating a DynamoDB table, how many read capacity units should you provision to be able to sustain strongly consistent reads of 11 KB per second?
3
2
1
0

A

A. A single strongly consistent read of an item up to 4 KB consumes one read capacity unit. Hence, reading 11 KB of data per second using strongly consistent reads would consume three read capacity units. Were you to use eventually consistent reads, you would need only two read capacity units, as one eventually consistent read gives you up to 8 KB of data per second. Regardless, you must specify a read capacity of at least 1, so 0 is not a valid answer.

21
Q

Which Redshift node type can provide the fastest read access?
Dense compute
Dense storage
Leader
KEY

A

B. The dense storage node type uses fast SSDs, whereas the dense compute node uses slower magnetic storage. The leader node doesn’t access the database but coordinates communication among compute nodes. KEY is a data distribution strategy Redshift uses, but there is no such thing as a key node.

22
Q

Which DynamoDB index type allows the partition and hash key to differ from the base table?
Eventually consistent index
Local secondary index
Global primary index
Global secondary index

A

D. When you create a table, you can choose to create a global secondary index with a different partition and hash key. A local secondary index can be created after the table is created, but the partition key must be the same as the base table, although the hash key can be different. There is no such thing as a global primary index or eventually consistent index.

23
Q

To ensure the best performance, in which of the following situations would you choose to store data in a NoSQL database instead of a relational database?
You need to perform a variety of complex queries against the data.
You need to query data based on only one attribute.
You need to store JSON documents.
The data will be used by different applications.

A

B. NoSQL databases are optimized for queries against a primary key. If you need to query data based only on one attribute, you’d make that attribute the primary key. NoSQL databases are not designed for complex queries. Both NoSQL and relational databases can store JSON documents, and both database types can be used by different applications.

24
Q

What type of database can discover how different items are related to each other?
SQL
Relational
Document‐oriented store
Graph

A