diff --git a/_notebooks/2023-05-16-RDStutorial.ipynb b/_notebooks/2023-05-16-RDStutorial.ipynb new file mode 100644 index 0000000..781b127 --- /dev/null +++ b/_notebooks/2023-05-16-RDStutorial.ipynb @@ -0,0 +1,108 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# RDS Tutorial\n", + "> Setting up AWS RDS PostgreSQL Database and connecting with Spring Boot\n", + "\n", + "- layout: default\n", + "- badges: false" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# What is RDS? \n", + "\n", + "Rather than having a database stored on a local file, the RDS database is stored on the cloud. " + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Creating the RDS Database Instance\n", + "\n", + "Instructions here" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In ``pom.xml``, add the following dependencies:\n", + "\n", + "```\n", + "\n", + "\torg.springframework.boot\n", + "\tspring-boot-starter-data-jpa\n", + "\n", + "\n", + "\torg.springframework.boot\n", + "\tspring-boot-starter-web\n", + "\n", + "\n", + "\torg.postgresql\n", + "\tpostgresql\n", + "\truntime\n", + "\n", + "\n", + "```\n", + "\n", + "In ``application.properties``, add the following configurations:\n", + "\n", + "```\n", + "spring.datasource.url=jdbc:postgresql://:/ \n", + "spring.datasource.username=YOUR_USERNAME\n", + "spring.datasource.password=YOUR_PASSWORD\n", + "spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect\n", + "spring.jpa.hibernate.ddl-auto=update\n", + "spring.jpa.hibernate.show-sql=true\n", + "\n", + "```\n", + "\n", + "Now, the spring application is connected to the RDS database in the cloud. " + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Using the Database\n", + "\n", + "After setting up the RDS database, you should be able to work with spring as usual. \n", + "\n", + "https://nirajsonawane.github.io/2022/04/18/Spring-Boot-AWS-RDS/" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.12" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}