You are on page 1of 27

NAME - NIKHIL PAWAR

BATCH - C24
ROLL NO - 2103134

EXPERIMENT NO. 8

Aim:- To study and Implement a Database as a Service on SQL databases Using


AWS RDS.

Theory:- Database as a Service (DBaaS) is a cloud computing service model that


provides users with access to a database without the need for setting up
physical hardware, installing software, or managing the infrastructure. In
DBaaS, the database service provider handles all the tasks related to database
management, such as provisioning, patching, backup, and scaling, allowing
users to focus on their applications and data.

Some popular DBaaS providers and their services include:

Amazon Web Services (AWS) - Amazon RDS, Amazon Aurora, Amazon


DynamoDB
Microsoft Azure - Azure SQL Database, Cosmos DB
Google Cloud Platform (GCP) - Cloud SQL, Firestore
SQL/NOSQL databases supported by AWS:
AWS supports a variety of SQL and NoSQL databases, including:

SQL Databases:
Amazon Aurora (MySQL and PostgreSQL compatible)
Amazon RDS (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server)
NoSQL Databases:

Amazon DynamoDB

Services provided by AWS RDS:


Amazon Relational Database Service (Amazon RDS) provides several key
services and features to simplify the setup, operation, and scaling of relational
databases in the cloud. Some of the main services provided by Amazon RDS
include:
1. Managed Database Instances: Amazon RDS allows you to easily create,
manage, and scale database instances in the cloud. It supports several
popular database engines, including MySQL, PostgreSQL, MariaDB,
Oracle Database, and Microsoft SQL Server.
2. Automated Backups: Amazon RDS automatically backs up your database
instances and retains backups for a specified period, allowing you to
restore your database to a previous state in case of data loss or
corruption.
3. High Availability: Amazon RDS provides high availability options, such as
Multi-AZ deployments, which automatically replicate your database to a
standby instance in another Availability Zone to provide fault tolerance
and minimize downtime.
4. Scalability: Amazon RDS allows you to easily scale your database
instance's compute and storage resources to handle increases in traffic
and workload demands.
5. Security: Amazon RDS provides built-in security features, such as
network isolation, encryption at rest and in transit, and IAM integration,
to help you secure your databases and comply with regulatory
requirements.
6. Monitoring and Metrics: Amazon RDS provides monitoring and metrics
through Amazon CloudWatch, allowing you to track the performance of
your database instances and set up alarms to notify you of any issues.
7. Database Engine Upgrades: Amazon RDS allows you to easily upgrade
your database engine to newer versions with just a few clicks, ensuring
that your database is always running on a supported and secure version.
8. Parameter Groups: Amazon RDS allows you to customize the
configuration of your database engine using parameter groups, which
can be applied to one or more database instances to modify their
behavior.
Overall, Amazon RDS provides a comprehensive set of services and features to
help you manage your relational databases in the cloud efficiently and securely.

Difference between RDS and Aurora:

Amazon RDS (Relational Database Service): It is a managed relational database


service that supports multiple database engines like MySQL, PostgreSQL,
MariaDB, Oracle, and SQL Server. RDS handles routine database tasks such as
provisioning, patching, backup, recovery, and scaling.

Amazon Aurora: Aurora is a MySQL and PostgreSQL-compatible relational


database built for the cloud, offering higher performance and scalability
compared to traditional databases. Aurora is designed to be highly available
and durable, with automatic failover and continuous backups.

AWS DBaaS terms:


Storage Types:

1. General Purpose SSD (gp2): This is the default storage type for Amazon
RDS. It provides a balance of price and performance for a wide variety of
workloads. It is suitable for most database workloads that require good
performance.

2. Provisioned IOPS SSD (io1): This storage type is designed for I/O-
intensive workloads, such as large relational databases. It allows you to
provision a specific level of I/O operations per second (IOPS), providing
predictable performance for your database.

3. Magnetic (standard): This storage type is a low-cost option suitable for


workloads with light or bursty I/O requirements. It is not recommended
for production databases with high-performance needs.

Endpoint:

In AWS, an endpoint is a URL that is used to connect to a specific AWS service.


For databases, the endpoint is used by applications or tools to connect to the
database instance or cluster. The endpoint includes the hostname and port
number needed to establish a connection.
Snapshot:

A snapshot is a point-in-time copy of your database instance or cluster.


Snapshots are stored in Amazon S3 and can be used to restore your database
to a specific state if needed. You can also create new database instances from
snapshots for testing or disaster recovery purposes.
Read Replica:

A read replica is a copy of your database instance that is used for read-only
operations. Read replicas can improve the performance of read-heavy
workloads by offloading read traffic from the primary database instance. Read
replicas can also be promoted to become standalone database instances in the
event of a failure of the primary instance.
Single AZ and Multi-AZ instances:

Single AZ (Availability Zone) instances: These instances are deployed in a single


Availability Zone and are not fault-tolerant. If the Availability Zone hosting the
instance experiences an outage, the instance will become unavailable until the
issue is resolved.

Multi-AZ instances: These instances are deployed across multiple Availability


Zones for high availability. In the event of a failure of the primary instance, AWS
automatically fails over to the standby instance in another Availability Zone.
Multi-AZ instances are recommended for production databases that require
high availability and durability.

IMPLEMENTATION:
Step1 : Login to aws console and search RDS

Step2: Click on to RDS and create database


Step 3: Select standard database
Step 4: Select MySQL and MySQL Community edition
Step 5:In Templates select Free tier

Step 6: Mention database name (default is database1) and username and


password
Step 7: Instance is t2.micro • Rest of things keep default
Step 8: Select Public Acess -Yes

Step 9: Click on to create Database


Step 10: It will take some time
Step 11: Go mysql workbench

Step 12: Click on to view credential


Step 13: Click on to database

Step 14: Copy Endpoint


Step 15: Go back to workbench

Step 26: Click on to mysql connection


Step 17: Paste copied endpoint in Hostname

Eg:- Connection Name : databaseShilpa


Username : admin

Click on to Test Connection Enter admin password


Step 18: Go to vpc security group

Step 19: Click on to inbound rules

Step 20: First select Click on to Edit inbound rule add rule select ipv4 --all traffic
(add 0.0.0.0./0) and save
Rules (important step to add inbound rule)
Step 21: Goto workbench (after giving details click on to Test Connection) Click
on Ok button Go to workbench double click on connection(databaseshilpa) It
will get opened
Step 22: Write query and execute
Create database tsec;
Use tsec;

Show tables;
Create table
for eg: create table student( roll int, name varchar(10), city varchar(10));

Describe student;
insert into student values(1,'shilpa','thane');
(Perform all CURD) operations)
Step 23: Now delete the instance (once you have done with it)

Select instance go to action stop instance and then delete instance Uncheck
create final shapshot
Step 24: Check the rds dashboard if there are any
instances running.
Conclusion: thus we have successfully implemented creating a
database and connecting it using aws services- RDS.

You might also like