========= AWS RDS ========= =================== What is Database ? =================== Database : It is a software which is used to store the data permanently. Whatsapp Application -------------> Database - Text msgs - Audio files - Video files - Documents => Every s/w application will use database to store the data permanently. => Software applications will use SQL to communicate with databases. => SQL stands for Structured Query Language. SQL Application ------------> Database => 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 .... => 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 8) Adminstration (DBA) => To overcome above challenges it is highly recommended to use Cloud Database. => 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 DB instance identifier : ashokit-db-instance public access : Yes Database options : Initial DB name : sbidb ==================== Database Details ==================== DB Endpoint DB username DB password DB port Note : Using above details we can check database connectivity. => Once connectivity is successful then we will share database details with developmen team. Master username : Master password : Endpoint : Note: Use MySQL Workbench and test database connectivitity. If you are able to connect that means your RDS Setup is successful. ============================ SQL Queries For Practice ============================ => Execute below sql queries using workbench show databases; use sbidb; 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); select * from emp; #### note: once practice completed, delete RDS instance ###### =========== Assigment =========== ### Springboot with RDS Integration : https://www.youtube.com/watch?v=GSu1g9jvFhY