<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Preethi Vuchuru27916</title>
    <description>The latest articles on DEV Community by Preethi Vuchuru27916 (@vuchuru27916).</description>
    <link>https://dev.to/vuchuru27916</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F463303%2Fc41f7ceb-517a-4bd4-b5f1-ee32067c4745.jpg</url>
      <title>DEV Community: Preethi Vuchuru27916</title>
      <link>https://dev.to/vuchuru27916</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vuchuru27916"/>
    <language>en</language>
    <item>
      <title>Blog App using AWS Amplify, Angular</title>
      <dc:creator>Preethi Vuchuru27916</dc:creator>
      <pubDate>Mon, 27 May 2024 05:37:00 +0000</pubDate>
      <link>https://dev.to/vuchuru27916/blog-app-using-aws-amplify-angular-3dd3</link>
      <guid>https://dev.to/vuchuru27916/blog-app-using-aws-amplify-angular-3dd3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/awschallenge"&gt;The AWS Amplify Fullstack TypeScript Challenge &lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a Blog Application using AWS Amplify and Angular where we can create a Blog by providing Title and description, list all the blogs and read a specific Blog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo and Code
&lt;/h2&gt;

&lt;p&gt;SOURCE CODE: &lt;a href="https://github.com/PreethiVuchuru27916/amplify-angular-template"&gt;https://github.com/PreethiVuchuru27916/amplify-angular-template&lt;/a&gt;&lt;br&gt;
App URL: &lt;a href="https://main.dvwj8fwztcl1x.amplifyapp.com/blog-list/0fefede3-f5ac-4f8c-be69-4ed412601c8d"&gt;https://main.dvwj8fwztcl1x.amplifyapp.com/blog-list/0fefede3-f5ac-4f8c-be69-4ed412601c8d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[1] Create Blog Button provides the user with a text editor to start working on the blog. &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jvifacvei121wgccr8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2jvifacvei121wgccr8a.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
[2] Used the ngx-editor to build the text editor and provided a scroll to add content of any size.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpin520eiz39hin81uz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqpin520eiz39hin81uz3.png" alt="Image description" width="800" height="478"&gt;&lt;/a&gt;&lt;br&gt;
[3] Have a publish option to create the Blog and show it under the list of Blogs&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9na3gjhy402ccru4qma8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9na3gjhy402ccru4qma8.png" alt="Image description" width="800" height="162"&gt;&lt;/a&gt;&lt;br&gt;
[4] List of Blogs&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgulmr0pqusf7czthvfj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgulmr0pqusf7czthvfj.png" alt="Image description" width="800" height="479"&gt;&lt;/a&gt;&lt;br&gt;
[5] Read more option on the list will take us to the individual Blog.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9rcp7erkiy3lvsfcswui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9rcp7erkiy3lvsfcswui.png" alt="Image description" width="800" height="480"&gt;&lt;/a&gt;&lt;br&gt;
[6]Utilized Sign out and Sign In and Create Account features provided by Amplify&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0614qekx095w3mc1eaf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0614qekx095w3mc1eaf6.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I have create a model called Blog that has title and description. To save it to a personal cloud sandbox, I ran the npx ampx sandbox
to get amplify_outputs.json file. This allowed me to make backend updates in a private cloud space. &lt;/li&gt;
&lt;li&gt;I have used authentication module and @aws-amplify/ui-angular for building the Sign Up, Sign In, Create Account. Also tried out the customization available for the Authenticator.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FUTURE WORK
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Will add a cover image that will make use of the File Storage concepts in AWS Amplify.&lt;/li&gt;
&lt;li&gt;Will add notifications to be sent over by using serverless functions.&lt;/li&gt;
&lt;li&gt;Will add draft versions and make sure only the loggedin users can see the drafts of their own. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you Dev.to for interesting challenges :) I knew about the challenge really late and was not able to finish what I had in mind. But something is better than nothing and hence my submission. Challenges like these are a great opportunity to explore new technologies. Excited for more challenges in future. &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>amplify</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Deploying Spring Boot Application on Heroku and connecting the app to MongoDB Atlas</title>
      <dc:creator>Preethi Vuchuru27916</dc:creator>
      <pubDate>Wed, 01 Mar 2023 23:32:55 +0000</pubDate>
      <link>https://dev.to/vuchuru27916/hosting-spring-boot-on-heroku-and-mongodb-on-mongodb-atlas-g8l</link>
      <guid>https://dev.to/vuchuru27916/hosting-spring-boot-on-heroku-and-mongodb-on-mongodb-atlas-g8l</guid>
      <description>&lt;p&gt;Hello Readers,&lt;/p&gt;

&lt;p&gt;I recently tried to set up a Spring Boot application on Heroku that could connect to a MongoDB database hosted on MongoDB Atlas. Along the way, I faced several challenges that I wanted to document for future reference. I thought this information could also be helpful for other people who may be trying to do the same thing. &lt;/p&gt;

&lt;p&gt;Here are the things I'll need for a quick deployment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A text editor such as IntelliJ&lt;/li&gt;
&lt;li&gt;A Spring Boot project&lt;/li&gt;
&lt;li&gt;An account with MongoDB Atlas&lt;/li&gt;
&lt;li&gt;An account with Heroku&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I set up a sample Spring Boot project using Spring Initializr [start.spring.io].&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2at6cdcr5hsn1xuma5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2at6cdcr5hsn1xuma5w.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I added some simple dependencies like Spring Web, Spring Boot Dev Tools, and Spring Data MongoDB.&lt;/p&gt;

&lt;p&gt;I created a simple REST service that only has one POST method to store details to the database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuoedggrkkix0ajpalxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuoedggrkkix0ajpalxf.png" alt=" " width="760" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9quh55e4r010m9i6e9uy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9quh55e4r010m9i6e9uy.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fin7lozi124mr794gk7j0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fin7lozi124mr794gk7j0.png" alt=" " width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsi6wp45ruzw0pazuq8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsi6wp45ruzw0pazuq8u.png" alt=" " width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment to Heroku&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To deploy my application to Heroku, I followed these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, I created an account on Heroku.&lt;/li&gt;
&lt;li&gt;Then, I created a new app by clicking on "New" and gave it a name and region.&lt;/li&gt;
&lt;li&gt;Heroku automatically creates many things for us, but we only need to focus on the deploy option it provides for hosting applications.&lt;/li&gt;
&lt;li&gt;To deploy my code to Heroku, I needed to have a GitHub repository to store it. This repository could either be my personal GitHub repository or a Heroku-provided GitHub repository that is created when the app is created.&lt;/li&gt;
&lt;li&gt;I chose to use the Heroku-provided GitHub repository for pushing my changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqaqjtcsl25uyoddgth1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqaqjtcsl25uyoddgth1w.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To push changes to heroku git repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
&lt;code&gt;heroku git:remote -a sample-prooject&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git add&lt;/code&gt; &lt;br&gt;
&lt;code&gt;git commit -m "initial commit"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git push https://git.heroku.com/sample-prooject.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, whenever I push changes to the repository, Heroku automatically starts the build process to deploy the updated application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjutwlogipwyhl8lh3tw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjutwlogipwyhl8lh3tw.png" alt=" " width="800" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F733pfrxj2wxsujhle0ey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F733pfrxj2wxsujhle0ey.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ncpd3bn203ateo3v9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ncpd3bn203ateo3v9m.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, I faced an error during the deployment process. The reason for this error was that Heroku, by default, compiles using Java 8, but my project was specified to use Java 17.&lt;/p&gt;

&lt;p&gt;To resolve this issue and instruct Heroku to handle Java 17, I needed to add a file called "system.properties" in the root folder of my project. This file included the following line:&lt;/p&gt;

&lt;p&gt;java.runtime.version=17&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefw1maykoe47atib6dm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefw1maykoe47atib6dm3.png" alt=" " width="782" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After adding and committing the changes to my repository, I pushed the changes to Heroku using the command "git push &lt;a href="https://git.heroku.com/sample-prooject.git" rel="noopener noreferrer"&gt;https://git.heroku.com/sample-prooject.git&lt;/a&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feispl5zbsuuon1igikj2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feispl5zbsuuon1igikj2.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I wanted to store my data in a cloud-based MongoDB database and decided to use MongoDB Atlas for this purpose.&lt;/p&gt;

&lt;p&gt;To get started with &lt;strong&gt;MongoDB Atlas&lt;/strong&gt;, I followed these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I created an account on MongoDB Atlas.&lt;/li&gt;
&lt;li&gt;I chose the M0 option for deploying the database, as it was free of cost.&lt;/li&gt;
&lt;li&gt;I selected AWS as the provider and chose the nearest available region.&lt;/li&gt;
&lt;li&gt;I named my cluster "Cluster".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtb428fusrue6my9itsz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtb428fusrue6my9itsz.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After setting up the cluster, I created a database user for my MongoDB database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zs1q5327hrvzq78ehaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zs1q5327hrvzq78ehaf.png" alt=" " width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now I clicked on "Connect" in the MongoDB Atlas dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;spring.data.mongodb.uri=mongodb+srv://preethi27916:&amp;lt;yourpw&amp;gt;@cluster.ogokpuw.mongodb.net/?retryWrites=true&amp;amp;w=majority&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;spring.data.mongodb.database=sampledb&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now I pushed my changes to heroku git to host the application.&lt;/li&gt;
&lt;li&gt;Next, I added a connection IP address (i.e., the IP address from which I wanted to connect to this database) and clicked on "Connect to Application". [During the initial stages of setting up the connection between my application and database, I faced an issue where the connection was failing. After some investigation, I discovered that the Heroku-deployed application IP was not being recognized by MongoDB Atlas.
To resolve this issue, I had to whitelist the IP address by specifying 0.0.0.0/0, which means that my database could be accessed from any IP address.].&lt;/li&gt;
&lt;li&gt;MongoDB Atlas provided me with a connection string, which I needed to specify in the application properties file (located in the resources folder) of my Spring Boot project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, I tested my application by invoking the URL "&lt;a href="https://sample-prooject.herokuapp.com/name/ihteerp" rel="noopener noreferrer"&gt;https://sample-prooject.herokuapp.com/name/ihteerp&lt;/a&gt;" with a POST method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpipbdjfo9wexsxusxmxt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpipbdjfo9wexsxusxmxt.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After testing my application and verifying that the data was being inserted into my MongoDB database, I can confirm that I have successfully completed the deployment of my application and database, and have set up the interaction between the two.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What exactly does Indexing in a Database do?</title>
      <dc:creator>Preethi Vuchuru27916</dc:creator>
      <pubDate>Sun, 04 Oct 2020 07:18:12 +0000</pubDate>
      <link>https://dev.to/vuchuru27916/what-exactly-does-indexing-in-a-database-do-28a3</link>
      <guid>https://dev.to/vuchuru27916/what-exactly-does-indexing-in-a-database-do-28a3</guid>
      <description>&lt;p&gt;Hey there! While working with the database, I came to know how important it is to use index on a table which holds a large number of records. In this article, I will be explaining &lt;br&gt;
what difference does it make to add an index to a table.&lt;/p&gt;

&lt;p&gt;Consider the below student table is created in Oracle SQL Database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkorkvlwrvphmi5rm0v6a.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkorkvlwrvphmi5rm0v6a.PNG" alt="Alt Text" width="474" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I want to get the details of the students who are in Primary Grade. Obviously I need to write a select query.&lt;/p&gt;

&lt;p&gt;Select * from student where student_grade = “Primary”;&lt;/p&gt;

&lt;p&gt;Now what happens? &lt;/p&gt;

&lt;p&gt;Internally it identifies the column student_grade and searches sequentially all the records which match Primary.&lt;/p&gt;

&lt;p&gt;It finds the first record matching primary and returns the row. It finds the second record matching primary and returns the row. It continues its process of finding Primary. Skips third record and finds fourth record matching primary. Now does it stop? No. It still continues to go till the end of the table searching for primary. &lt;/p&gt;

&lt;p&gt;It will look fine for a table with just 5 rows but what if I have a table with 10000 records. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F780qwrkwbilhu80vb2uo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F780qwrkwbilhu80vb2uo.PNG" alt="Alt Text" width="472" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lot of time gets involved and who would respect such a time delay?&lt;/p&gt;

&lt;p&gt;Here is where our Indexing comes to save the time. We are all aware of what indexing means. It keeps references for quicker access. A cliche example would be a index of a textbook keeping page references to topics covered in the book.&lt;/p&gt;

&lt;p&gt;Now lets create a index on the column Student_grade and see what happens.&lt;/p&gt;

&lt;p&gt;Create index student_student_grade_I on student(student_grade);&lt;/p&gt;

&lt;p&gt;student_student_grade_I is the index_name.&lt;/p&gt;

&lt;p&gt;With the addition of index on our table, a new data structure gets created which will hold the student_grade and a pointer that references the original record in the table. The Data Structure is BTree which offers the advantage that it has all the records sorted. A index would look similar to the below table on the left.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6po1amwc1xe2kwbi6e0b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6po1amwc1xe2kwbi6e0b.PNG" alt="Alt Text" width="629" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It now finds 2,3,4 records matching primary. Stops executing and returns the records with the help of record_pointer.&lt;/p&gt;

&lt;p&gt;References&lt;/p&gt;

&lt;p&gt;1)&lt;a href="https://www.youtube.com/watch?v=aZjYr87r1b8"&gt;https://www.youtube.com/watch?v=aZjYr87r1b8&lt;/a&gt;&lt;br&gt;
2)&lt;a href="https://chartio.com/learn/databases/how-does-indexing-work/"&gt;https://chartio.com/learn/databases/how-does-indexing-work/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>sql</category>
      <category>database</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
