Interview Questions on Relational Database Service
1. What is AWS RDS?
Amazon Relational Database Service (RDS) is a distributed relational database service provided by Amazon Web Services. It is a web service that runs “in the cloud” and is designed to facilitate the setup, operation, and scaling of a relational database to be used in applications.
2. What is RDS DB instance?
A DB instance is a standalone database environment in the AWS Cloud. Your DB instance may include numerous user-created databases. You can access your DB instance with the same tools and applications that you would use to access a standalone database instance.
3. Which database engines are supported with Amazon RDS?
Amazon RDS currently supports below databases:
- MySQL
- PostgreSQL
- MySQL
- MariaDB
- Oracle
- Microsoft SQL Server
4. What is the maximum number DB instances can user can run with Amazon RDS?
User are allowed to have up to 40 Amazon RDS DB instances by default. Under the “License Included” model, up to 10 from those 40 can be Oracle or SQL Server DB instances.
5. Is it possible for a user to have multiple databases on RDS?
- RDS for MySQL
- No limit imposed by software. The MySQL standard for RDS MySQL database instances is that there is no limit on the number of databases (http://dev.mysql.com/doc/refman/5.5/en/database-count-limit.html).
- RDS for Oracle
- 1 database per instance, no limit on number of schemas per database.
- RDS for SQL Server
- 30 databases per instance.
- RDS for PostgreSQL
- No limit imposed by software.
6. How to upgrade Amazon RDS instances?
The modify-db-instance command can be used to upgrade Amazon RDS instances. Data migration is not required. However there would be some downtime/OutageTime roughly 5 minutes.
7. What are the top Alternatives to Amazon RDS?
Below are the most popular alternatives and competitors to Amazon RDS.
Amazon Redshift
Apache Aurora
MySQL, Oracle
Heroku Postgres
8. How to enable automated backups in RDS?
You can enable automated backups in RDS in below ways:
Using RDS API
- You can use the RDS API ModifyDBInstance operation to enable automated backups in RDS with the following required parameters:
- DBInstanceIdentifier
- BackupRetentionPeriod
From AWS Console
- Sign in to the AWS and go to Amazon RDS console at https://console.aws.amazon.com/rds/.
- Navigation pane -> Select databases -> Select DB instance that you want to modify.
- Select Backup retention period -> Provide a nonzero positive value, like 5 days.
- Choose Continue -> Choose Apply immediately.
9. How to delete RDS instance with RDS cluster in AWS using boto3?
We can use delete_db_instance on rds client as given below:
rds_client = boto3.client('rds')for cluster in result ["rds"]: print ("RDS DB is about to delete %s | in %s" % (cluster['DBInstanceIdentifier'])) response = rds_client.delete_db_instance(DBInstanceIdentifier=cluster['DBInstanceIdentifier'])SkipFinalSnapshot=TrueDeleteAutomatedBackups=True
10. How AWS RDS ensure high availability and reliability?
AWS RDS allows multi-AZ deployment to ensure high availability and reliability.
- With the use of multi-AZ deployment feature, AWS automatically provisions and maintains a synchronous standby replica in a different Availability Zone.
- AWS synchronously replicates the data from the primary to the secondary database instance.
- Failover Support: In case if the primary database instance fails or gets shut down in any way, AWS will automatically fail over to another secondary database instance.
11. Which RDS database engines support multi-AZ deployment?
AWS RDS allows multi-AZ deployment to ensure high availability and reliability. Multi-AZ deployments support can be used for below RDS database engine:
MariaDB
MySQL
Oracle
PostgreSQL
12. Which Amazon RDS database engine by default supports multi-AZ deployments?
Amazon RDS offers Multi-AZ deployments with Always On AGs for the listed SQL Server versions and editions:
SQL Server 2019
- Standard and Enterprise Editions.
SQL Server 2017
- Enterprise Edition 14.00. 3049.1 or higher.
13. What is the difference between Amazon RDS and Amazon EC2?
Both Amazon RDS and Amazon Elastic Compute (EC2) offer different benefits to the users depending on the requirements. Interviewers may ask this question to assess your knowledge of the two services. Briefly describe how the two services differ.
Example answer: ‘Amazon RDS is a managed database-as-a-service that handles most of the management tasks and helps in setting up, operating and scaling relational databases on the cloud. Amazon EC2 is a web service that helps run application programs in the AWS public cloud. RDS is easy to set up, manage and maintain along with the automation of security, management and maintenance by AWS. With EC2, the user is responsible for routine maintenance activities, upgrades and patches.
RDS is automated and easily integrated with Amazon’s scaling tools for both vertical and horizontal scaling. In EC2, the user requires setting up a scalable architecture manually.’
14. Is it possible to run multiple databases in a DB instance?
Amazon RDS supports access to different databases. During an interview, interviewers may ask you this question to determine your familiarity with DB instances and database engines. In your answer, provide a list of databases that RDS supports. You can also include an example to support your answer.
Example answer: ‘Yes, RDS provides access to SQL Server, MySQL, PostgreSQL and MariaDB databases along with back-ups and regular upgrades. RDS can run up to 100 databases per DB instance for the SQL Server and unlimited databases for MySQL, Amazon Aurora, PostgreSQL and MariaDB. It can also run one database per instance for Oracle and has no limit on the number of schemas per database.’
15. What is an RDS interface?
There are several interfaces available through Amazon RDS to suit different relational database use cases. Hiring managers often ask this question to assess your knowledge of RDS interfaces and how you can use it to automate tasks and manage database instances. Define the term and list its uses.
Example answer: ‘An RDS interface helps access RDS services, such as running programs, accessing and uploading data. The interfaces include an AWS API, which helps information pass between two systems and a command-line interface which helps execute database commands. The RDS interface also includes a GUI console that helps users work with RDS services.’
16. What is the impact of creating an RDS snapshot on performance?
RDS snapshots are important in backing up DB instances and restoring them in the future. An interviewer may ask this question to assess your understanding of how RDS snapshots work and how they affect AWS RDS performance and security.
Example answer: ‘When creating manual snapshots, creating a snapshot may affect the performance of other clients connected to the database. In the case of automated snapshots, RDS automatically creates daily snapshots that have no impact on performance. With single AZs, it is possible that creating a DB snapshot can cause a brief suspension of input and output functionalities in RDS instances. Creating a DB snapshot in a Multi-AZ instance would not affect other instances of RDS, since the creation of such snapshots is from a standby instance.
Similarly, there is no impact on performance or interruption with Aurora clusters since they constantly keep backup data.’
17. What are the advantages of using AWS RDS?
AWS RDS offers significant benefits over traditional databases. This entry-level question helps interviewers assess your primary knowledge of AWS RDS. In your answer, list the benefits of using AWS RDS.
Example answer: ‘AWS RDS is a managed cloud database service that offers various benefits for businesses and individuals. It allows individual allocation of storage and CPU and offers highly available database servers. AWS RDS offers read replicas to enhance performance and both automatic and manual database backups. It also supports a variety of programming languages and frameworks, making it a more versatile database option.’
18. What are the differences between RDS, DynamoDB and RedShift?
RDS, DynamoDB and RedShift are three popular database solutions provided by Amazon. Hiring managers ask this question to gauge your knowledge of various Amazon services and whether you can choose a suitable service based on requirements.
Example answer: ‘Amazon RDS is a database management service that helps manage database administrative tasks and structured data. It is compatible with database engines, such as Oracle, Microsoft SQL Server, MariaDB and Amazon Aurora. It is the only service among the three that supports Microsoft SQL Server. DynamoDB is a key-value database that supports unstructured data and runs on NoSQL engine. It is an enterprise-level solution that is best suited for use cases, such as session data and key-valued cloud services.
Amazon RedShift is a relational database and data warehouse product, which is more powerful and expensive. It is best suited for more complex calculations and mostly used by large corporations.’
19. What is the best method for monitoring RDS database disk space usage?
There is a possibility for database instances to run out of storage space. An interviewer may ask this question to ensure you can prevent downtimes and other inconveniences beforehand that can happen because of the lack of free disk space.
Example answer: ‘Amazon CloudWatch console is a tool for monitoring disk space usage in RDS database instances. It monitors a wide range of AWS metrics, including disk space usage. Using CloudWatch, users can set up alarms to get notified when the disk space usage of their databases reaches certain levels. Users can also opt for the AWS command-line interface to create alarms and monitor available storage space.’