Practice Test

True/False: MongoDB and PostgreSQL are examples of non-relational databases.

• True
• False

Answer: False.

Explanation: MongoDB is a non-relational database, while PostgreSQL is an example of a relational database.

What are the main types of databases, as classified by data model?

• Serverless databases and In-memory databases.
• SQL databases and NoSQL databases.
• Relational databases and Non-relational databases.
• Cloud databases and On-premise databases.

Answer: c) Relational databases and Non-relational databases.

Explanation: Databases are commonly classified by data model into relational and non-relational (or NoSQL) databases.

Which of the following is a feature of serverless databases?

• They don’t need any server to run.
• Operational management tasks are done automatically.
• Data stored is volatile.
• They are slower compared to traditional databases.

Answer: b) Operational management tasks are done automatically.

Explanation: Serverless databases automatically handle operational tasks such as scaling, backup, and data protection.

True/False: AWS Aurora is a relational database service by Amazon.

• True
• False

Answer: True.

Explanation: AWS Aurora is a part of Amazon RDS that offers compatibility with MySQL and PostgreSQL relational databases.

Which of the following is NOT an advantage of In-memory databases?

• High speed
• Data persistence
• Cost-effectiveness
• Real-time analytics

Answer: c) Cost-effectiveness

Explanation: In-memory databases are not typically cost-effective since every GB of memory is expensive compared to disk storage.

Multiple Select: Which of the following are examples of non-relational databases?

• MySQL
• Redis
• MongoDB
• Oracle

Answer: b) Redis, c) MongoDB.

Explanation: Redis and MongoDB are examples of non-relational databases, while MySQL and Oracle are examples of relational databases.

True/False: All non-relational databases support ACID transactions.

• True
• False

Answer: False.

Explanation: ACID (Atomicity, Consistency, Isolation, Durability) transactions are a key feature of relational databases. While some non-relational databases have implemented ACID transactions, not all of them support it.

Which AWS service allows you to set up, operate, and scale a relational database in the cloud?

• AWS Athena
• AWS Redshift
• AWS RDS
• AWS DynamoDB

Answer: c) AWS RDS

Explanation: AWS RDS (Relational Database Service) allows you to set up, operate, and scale a relational database in the cloud.

Which of the following is more appropriate for handling structured data and complex queries?

• Serverless databases
• NoSQL databases
• Relational databases
• In-memory databases

Answer: c) Relational databases

Explanation: Relational databases are designed to handle structured data and allow complex queries with joins and relations.

What is a significant advantage of in-memory databases?

• Lower cost
• Data durability
• High-speed data access
• Large data storage

Answer: c) High-speed data access

Explanation: In-memory databases store data in memory instead of hard drives, allowing high-speed data access.

Interview Questions

What is a serverless database in AWS?

AWS Serverless is a database service that automatically scales capacity up and down based on your application’s actual usage and only charges for the time your code is running and the resources it requires.

What is a relational database in AWS?

Amazon RDS (Relational Database Service) is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database.

What is a non-relational database in AWS and give an example?

A non-relational database, also known as NoSQL database, provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. An example in AWS is Amazon DynamoDB.

What is an in-memory database in AWS and give an example?

In-memory databases are databases that keep the entire database in memory. One of the AWS services that provide an in-memory database is Amazon ElastiCache.

Compare a relational database with a non-relational database in terms of structure.

A relational database stores data in a structured format, using rows and columns. Non-relational databases, on the other hand, store data in a format that does not need to be in rows and columns, could be key-value pairs, document-based, or graph databases.

How does AWS Aurora differ from a traditional relational database?

AWS Aurora is compatible with MySQL and PostgreSQL relational databases, and delivers up to five times the throughput of standard MySQL and three times the throughput of standard PostgreSQL. This performance is on par with commercial databases, at 1/10th the cost.

What is Amazon Redshift and how is it connected to database services?

Amazon Redshift is a fully managed, petabyte-scale data warehouse service in the cloud. It allows users to analyze data using their existing business intelligence tools and SQL queries.

What are the advantages of using serverless databases in AWS?

Serverless databases in AWS, such as Amazon DynamoDB, offer automatic scaling, which means they can handle sudden increases in traffic. They also have built-in security and backup options, and users only pay for the resources they actually use.

What advantages does an in-memory database have over a traditional database?

In-memory databases can deliver read and write times much faster than traditional disk-based databases because they store data in main memory, rather than on disk. This feature is good for applications that require real-time data processing.

Describe the primary benefit of a relational database in AWS.

The primary benefit of a relational database in AWS, like Amazon RDS, is that it allows users to create, manage, and scale a relational database in the cloud easily. It also offers automatic backups, patch management, and failover support.

What type of workload is best for a non-relational database?

Non-relational databases are best for workloads that require flexible data models, the ability to scale horizontally, and the ability to distribute data and traffic over multiple servers. Examples include IoT applications, session management, and time-series data.

How does one select the right database type in AWS?

The choice of a database in AWS depends on various factors, including the nature of the data, the speed of operation needed, cost, performance, durability, and required scalability.

Is it possible to shift from a relational database service to a serverless database service in AWS?

Yes, it is possible to shift from a relational database service to a serverless database service in AWS. The transition, however, requires data migration and changes in the application layer to accommodate different approaches to data transactions.

What is AWS Database Migration Service?

AWS Database Migration Service is a tool that helps to migrate databases to AWS easily and securely while ensuring that the applications remain operational during the migration.

What is the advantage of using the AWS Database Migration Service?

The advantage of using AWS Database Migration Service is that it supports homogeneous migrations such as Oracle to Oracle, and heterogeneous migrations between different database platforms, like Oracle to Amazon Aurora or Microsoft SQL Server to MySQL.

Leave a Reply

Your email address will not be published. Required fields are marked *