========= AWS RDS ========= 1) What is Database 2) Why we need database 3) On-Prem Database & Challenges 4) What is RDS & Why 5) RDS Setup 6) Connecting with RDS DB Server using MySQL Workbench =================== What is Database ? =================== Database : It is a software which is used to store the data permanently. software application -----------------------------> Database => Every s/w application will use database to store the data permanently. => Software applications will use SQL to communicate with databases. => Using SQL we can perform CRUD operations in the database. C -> Create R -> Retrieve U -> Update D -> Delete => We have several databases in the market - Oracle - MySQL - SQLServer - PostGres SQL => The above databases are called as Relational Databases. => Relational databases will store the data using tables. => Table represents data using Rows and columns. ================= Database Setup ================= => We can setup database in 2 ways 1) On-Prem Database 2) Cloud Database ================================== Challenges with On-Prem Database ================================== 1) Purchase DB server license 2) Install DB Server s/w 3) Security 4) Network 5) Availability 6) Scalability 7) Backup & Restore 8) Adminstration (DBA) => To overcome above challenges it is highly recommended to use Cloud Databases. => If we use cloud database then cloud provider will manage database server for us. => AWS RDS service providing cloud databases. => RDS stands for relational database service in AWS cloud. => RDS is used to create & manage relational databases. => RDS is a fully managed service in AWS cloud. => RDS works based on "pay as you go" model. ============= RDS Lab Task ============= Step-1 : Create MySQL DB Server using RDS Step-2 : Enable "MySQL :: 3306" port number in Security Group Inbound Rules Step-3 : Test MySQL DB Connection using "MySQL Workbench software (client s/w)" Step-4 : Execute some SQL queries for practice (optional) Step-5 : Delete RDS instance to avoid billing. ============================ MySQL DB Creation Steps ============================ Creation method : Standard Create Engine Type : MySQL Templates: Free Tier public access : Yes Credentials : Self Managed Additional Configuarations : Initial DB name : ashokitdb ==================== Database Details ==================== DB Endpoint : database-1.czmq680mayav.ap-south-2.rds.amazonaws.com DB username : admin DB password : Admin123 DB port : 3306 Note : Using above details we can check database connectivity. => Once connectivity is successful then we will share database details with development team. ============================ SQL Queries For Practice ============================ => Execute below sql queries using workbench show databases; use ashokitdb; show tables; ## table creation query create table emp( eid int(10), ename varchar(100), esal int(10) ); ## retrieve records query select * from emp; ## insert query insert into emp values(1, 'john', 1000); insert into emp values(2, 'smith', 2000); ## retrieve records query select * from emp; ====================================================================================== Spring Boot with RDS Integration : https://www.youtube.com/watch?v=GSu1g9jvFhY ======================================================================================