<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by AliceHeeyeon Kim on Medium]]></title>
        <description><![CDATA[Stories by AliceHeeyeon Kim on Medium]]></description>
        <link>https://medium.com/@lovelyalice.kim?source=rss-13eadb1bc4b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kid1id0aJRaefmXx</url>
            <title>Stories by AliceHeeyeon Kim on Medium</title>
            <link>https://medium.com/@lovelyalice.kim?source=rss-13eadb1bc4b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:39:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lovelyalice.kim/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Interface vs Abstract class]]></title>
            <link>https://medium.com/@lovelyalice.kim/interface-vs-abstract-class-fbc115334a02?source=rss-13eadb1bc4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbc115334a02</guid>
            <category><![CDATA[abstract-class-interface]]></category>
            <category><![CDATA[object-oriented-concepts]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[interfaces]]></category>
            <dc:creator><![CDATA[AliceHeeyeon Kim]]></dc:creator>
            <pubDate>Thu, 11 Jul 2024 21:06:20 GMT</pubDate>
            <atom:updated>2024-07-11T21:07:31.919Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. The Story of an Abstract Class</h3><p>Imagine you are a game developer. You need to create a game character, and each character should have the attributes of <em>attack power, defense</em> and <em>speed.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*aXM2xvZdjPl-6ahagcNRiw.png" /></figure><p>The problem is there are 1000 of characters, and it is possible to forget to give these the attributes by mistake!</p><h4>So, the abstract class comes to your rescue.</h4><p>When a child class inherits from abstract class, it must implement the abstract functions; otherwise, the compiler will warn you with an error.</p><p>Let’s see the example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*AFOfRgwnmGpsplwbf_QpwQ.png" /></figure><p>The Pikachu class, which inherits from the Character class, didn’t implement the Defense function, and immediately got an error.</p><p><strong>*** An Abstract class can include normal functions, but if it has at least one abstract function, the class should be defined as abstract.***</strong></p><p>What if there is no abstract class?</p><p>A project manager would need to explain numerous details when assigning tasks to each developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfhC53c1NmEIjeX9TWKGrg.jpeg" /></figure><h3>2. The Problem with the Abstract class (aka. Multiple Inheritance)</h3><p>There are abstract classes which are Dad1 and Dad2. As I mentioned right above, an abstract class can include normal functions.</p><p>Both classes have the same name for normal function, <em>say(). </em>How could the complier know which function it should use if you call the say() function?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*lXztjEyoyM4KlIVZA4LrEQ.png" /></figure><p>That’s why Object-Oriented Programming languages such as Java and C# don’t allow the multiple inheritance for classes.</p><h3>3. Interface</h3><p>So, interfaces were introduced to allow multiple inheritance!</p><p>Unlike abstract classes, interfaces can’t have normal(regular) variables and functions.</p><h4>Interfaces only contain abstract functions.</h4><p>Hence, no need to add the keyword ‘abstract’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*Mvy4hn-wAOZn0TEy6IHgQA.png" /></figure><p>Since abstract functions in interfaces are not implemented (they are just empty functions!), there is no conflict even if multiple interfaces have functions with identical names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*6bmbF8rHec_qNW7tyQlOVg.png" /></figure><h4>Key Summary of Interface and Abstract Class</h4><ul><li><strong>Abstract Methods</strong>: Abstract methods are designed to be implemented in child classes. If a class includes at least one abstract method, the class must be defined as an abstract class.</li><li><strong>Abstract Classes</strong>: Abstract classes can include regular methods, which is why multiple inheritance is not allowed for abstract classes.</li><li><strong>Interfaces</strong>: Interfaces can only have abstract methods, and they allow multiple inheritance.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbc115334a02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding in OOP(Object Oriented Programming)]]></title>
            <link>https://medium.com/@lovelyalice.kim/understanding-in-oop-object-oriented-programming-0aa7bc34272c?source=rss-13eadb1bc4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/0aa7bc34272c</guid>
            <category><![CDATA[inheritance]]></category>
            <category><![CDATA[class]]></category>
            <category><![CDATA[encapsulation]]></category>
            <category><![CDATA[objectorientedprogramming]]></category>
            <category><![CDATA[constructor]]></category>
            <dc:creator><![CDATA[AliceHeeyeon Kim]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 12:04:32 GMT</pubDate>
            <atom:updated>2024-07-06T12:04:32.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWaY-0DDrxVX-4LBZXgFBg.png" /></figure><p>If you are learning programming, you may have heard about <strong>Object-Oriented Programming (OOP)</strong>. What is it, and why was it created?</p><p>Imagine you are working at an  Apple Store. This is a huge store with thousands of products, and your boss wants you to create product information for all of them.</p><p>You might start like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*NgW7x0e_CvbiFr7MdbRZUw.png" /></figure><p>It might take ages to create information for thousands of iPhones, so thinking about a more efficient way to <strong>minimize repetitive tasks</strong> and <strong>prevent mistakes</strong> like skipping any section is crucial. This is where Object-Oriented Programming (OOP) comes into play.</p><h3>1. Class</h3><p>Simply put, a Class is like <strong>a task specification sheet</strong>. Anyone can perform the same task based on this, much like factory work.</p><p>All iphone has name, price and size value, set a class like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*Le7MkiM6Z8sTqFTdxj7dhA.png" /></figure><h3>1–1. Constructor</h3><p>But, how we can set a value using this class? Now we need a bulit-in function called a <strong>constructor</strong>. This function sets the property values for the first time, making it ready to take values from the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*YIu2kcTw7y--GKmbCG7PMA.png" /></figure><h3>1–2. This</h3><p>Using a constructor, we take parameters (name, price, size) and assign these values to the class properties. However, it can be confusing to know which one is the class property in a statement like <strong>name = name</strong>.</p><p>We use ‘<strong><em>this’</em></strong> to refer to the properties within the class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*MSaPRZWdP-9PXSks2JkyZQ.png" /></figure><p>Let’s create iphone data using this class!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*kcA0G8IIhFj6Z1Ln4dFW-w.png" /></figure><p>Wow, it was done with just one line. <br>I checked the data with <strong><em>console.log(iphone1)</em></strong> and it said…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*LgjcK4oyiLG_jIBFzMGMgQ.png" /></figure><p>You can see that the data saved within the class ‘Iphone’.</p><h3>2. Inheritance</h3><p>At Apple store, they are not only sell iphone. They have Macbook, ipad, ipod and accessaries for them ! Let’s create class for other products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*JuewUFbq4nD-vfbqtxOg3g.png" /></figure><p>Have you noticed that the name and price properties are repeated in every class? We can skip this repetitive work with the OOP concept of <strong>Inheritance</strong>.</p><p>We can create a <strong>Superclass</strong> to allow its properties to be inherited and used. Then, by using extends, a child class can use the properties in the superclass as if they were its own.</p><p>But what about the constructor? Can we use<strong> ‘this’ </strong>for the properties of the superclass?</p><p><strong>No</strong>, we just call <strong>super( )</strong> and put the values of the parameters inside it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*PDNEF9Hy5tkqkdcC3XLjEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*oSaFFt-QpWW2ibT41ET3sQ.png" /></figure><p>Now, the name and price properties can be used in all classes. If you want to add any property that applies to all products, just add it to the Product class. This makes managing your data SUPER EASY 😎!</p><h3>3. Encapsulation</h3><p>What if you accidentally set the price to -1000?</p><p>It doesn’t make sense! We can prevent this critical mistake by creating a function within the superclass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*ya1PaG0do8oxdL1-FwAn1g.png" /></figure><p>Then, <em>iphone1.setPrice(-1000);</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*CtYY8xpMrUm9ffhRBaRD2w.png" /></figure><p>Tada -! 🔔</p><p>So, we can define any functions related to properties within the class. This is known as encapsulation of the class.</p><p>Since we understand OOP, many programming concepts we use make sense.</p><p>In JavaScript, we use ‘<strong>array’</strong> a lot, and it has various methods like <strong>array.sort() </strong>and <strong>array.map()</strong>.</p><p>In fact, an <strong>array is a class provided by JavaScript</strong>, and sort and map are methods defined within the Array class.🫢</p><p>In this post I covered,</p><ul><li>What is a ‘Class’</li><li>Constructure in a class</li><li>Why we use ‘this’</li><li>OOP : Inheritance</li><li>OOP : Encapsulation</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0aa7bc34272c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ep2.Designing RDBMS: Focus on Your Core Feature]]></title>
            <link>https://towardsdev.com/ep2-designing-rdbms-focus-on-your-core-feature-b95075a2843b?source=rss-13eadb1bc4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b95075a2843b</guid>
            <category><![CDATA[rdbms]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[designing-data]]></category>
            <dc:creator><![CDATA[AliceHeeyeon Kim]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 10:15:33 GMT</pubDate>
            <atom:updated>2024-07-01T16:48:48.005Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Episode, I am going to talk about database and how to design a table for your service.</p><h3>1. Understanding in Database</h3><blockquote><strong>What is database?</strong><br>It’s a data repository. <br>It can store data regardless of whether a program is running or not.<br>And the system that manages this data is called a <strong>Database Management System (DBMS)</strong>.</blockquote><p>DBMS can be divided into RDBMS and NoSQL based on the data storage format.</p><p>To briefly summarise their differences, RDBMS is structured data based on the relationships between data, whereas NoSQL consists of unstructured data in key-value pairs.</p><p>I will be focusing on RDBMS, specifically using a program called MySQL.</p><p>RDBMS stands for Relational DBMS, meaning a <strong>relational database</strong>.</p><p>The term “<strong>relational</strong>” does not need to be considered complicated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*pS6hL5lAliTr6bkr-rZ2XQ.png" /></figure><p>The User sheet and the Order List are different document, but they are related to each other. The Customer ID “1” in both documents refers to same person, Alice. This illustrates the concept of “relational”.</p><p>A relational database can be compared to Excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*HzgoIme4HhwY9XuhuAnOxg.png" /></figure><h3>2. How to design MySQL Table?</h3><p>First, summarise the core feature in one sentence.<br>For example, I am going to create a movie review sharing service. Then, the core feature would be -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*yScHVPEyHhYxws9aRMCVWQ.png" /></figure><p>As this sentence states, I need a <strong>Movies</strong> table and a <strong>Reviews</strong> table first. Obviously, since the reviews will be generated by users, I also need a <strong>Users</strong> table.</p><p>Let’s think about what kinds of data will be needed for each table:</p><p><strong>Movies :</strong></p><ul><li>Movie ID</li><li>Title</li><li>Director</li><li>Genre</li><li>Release Date</li><li>…</li></ul><p><strong>Reviews :</strong></p><ul><li>Review ID</li><li>Movie ID</li><li>User ID</li><li>Rating</li><li>Review Content</li><li>Review Date</li><li>…</li></ul><p><strong>Users :</strong></p><ul><li>User ID</li><li>Name</li><li>Email</li><li>Password</li><li>Join Date</li><li>…</li></ul><h3>3. Basic SQL</h3><p>Here’s basic SQL for CRUD(Create, Read, Update, Delete)</p><p><em>CREATE (INSERT)</em></p><blockquote><strong>INSERT INTO</strong> TableName (ColumnName1, ColumnName2, ColumnName3, …) <strong>VALUES</strong> (DataValue1, DataValue2, DataValue3, …);</blockquote><p>Example : <br>INSERT INTO Movies (MovieID, Title, Director, Genre, ReleaseDate) VALUES (1, ‘Inception’, ‘Christopher Nolan’, ‘Sci-Fi’, ‘2010–07–16’);</p><p>READ (SELECT)</p><blockquote><strong>SELECT</strong> ColumnName1, ColumnName2, ColumnName3, … <strong>FROM</strong> TableName <br><strong>WHERE</strong> condition;</blockquote><p>Example of retrieving all movies :<br>SELECT * FROM Movies;</p><p>Example of retrieving MovieID and Title for Sci-Fi Genre :<br>SELECT MovieID, Title <br>FROM Movies <br>WHERE Genre = ‘Sci-Fi’;</p><p>UPDATE</p><blockquote><strong>UPDATE</strong> TableName <br><strong>SET</strong> ColumnName1 = DataValue1, ColumnName2 = DataValue2, … <br><strong>WHERE</strong> condition;</blockquote><p>Example of updating the Genre for MovieID ‘1’ :<br>UPDATE Movies <br>SET Genre = ‘Science Fiction’ <br>WHERE MovieID = 1;</p><p>DELETE</p><blockquote><strong>DELETE FROM </strong>TableName<br><strong>WHERE</strong> condition;</blockquote><p>Example of removing data for MovieID ‘1’ :<br>DELETE FROM Movies <br>WHERE MovieID = 1;</p><h3>4. MySQL Workbench</h3><p>I am using MySQL Workbench to connect and manage MySQL databases.</p><p>You can download here :<br><a href="https://dev.mysql.com/downloads/workbench/">https://dev.mysql.com/downloads/workbench/</a></p><p>Once you operate the MySQL Workbench, you will see this window. <br>Click the ➕ button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPDPWIg9xxR-BSdQwp7bHg.png" /></figure><p>Then, this will pop up. Set the values as below :</p><ul><li>Connection Name : Anything you wish</li><li>Port : 3306</li><li>Hostname : EC2 instance Public IPv4 address</li><li>Password : MySQL root password</li></ul><p>If the ‘Test Connection’ works, click <strong>OK</strong> to connect !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6nrloxVA-p_oJYpTyqIYA.png" /></figure><p>Let’s create database and table. I am going to apply the table design that I created at step2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*EObZATPPaRYBnz6N-aHp5w.png" /></figure><p>This command creates a <strong>database</strong> named movie_reviews. Then, selects the movie_reviews database to be the current database in use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*fzwNur_jaaUg3xyuR3EsZA.png" /></figure><ul><li>id: This is the primary key for the table, which uniquely identifies each user. It is an integer that auto-increments with each new record.</li><li>username: This field stores the username of the user and cannot be null (NOT NULL).</li><li>email: This field stores the user&#39;s email address and cannot be null.</li><li>password: This field stores the user&#39;s password and cannot be null.</li><li>created_at: This field stores the timestamp when the record is created, with the default value being the current timestamp.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*onr2CG0d1SF_oE2aG2GdDg.png" /></figure><ul><li>title: This field stores the title of the movie and cannot be null (NOT NULL).</li><li>director: This field stores the director&#39;s name.</li><li>release_date: This field stores the release date of the movie.</li><li>image_url: This field stores the URL of the movie&#39;s image or poster.</li><li>description: This field stores a description of the movie.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*ca9N2I7p0NLh5RY-1Nd6Ow.png" /></figure><ul><li>user_id: This field stores the ID of the user who wrote the review. It links to the id field in the Users table.</li><li>movie_id: This field stores the ID of the movie being reviewed. It links to the id field in the Movies table.</li><li>review: This field stores the text content of the review.</li><li>rating: This field stores the rating given to the movie, typically as an integer.</li></ul><p>You can put everything at once and click the lightning bolt button to execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTOftVuOt4vOaUpboInw6A.png" /></figure><p>Now, schemas section on the left looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*wZ9J-JV8gtwBfKfNmjlUFA.png" /></figure><p>This is an example of inserting movie data. <br>No need to search data! Just use Chat GPT to generate dummy data :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*Ut-39R4UaUnbgXtRBqYDZQ.png" /></figure><p>Let’s check the data in the Movies table. If you hover over the table name, three icons will become visible, Click the last one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*nlJIkALVDkaKYXDDZFRX4g.png" /></figure><p>If you can see the data you inserted, the database is now ready to use!! 👏🏻👏🏻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msrE9bxvx7eNERC1EBxDBw.png" /></figure><p>What I have covered in this episode :</p><ul><li>The concept of relational databases</li><li>Designing MySQL tables</li><li>Basic SQL for CRUD operations</li><li>Managing MySQL databases using MySQL Workbench</li></ul><p>For next episode will be about connecting backend server and MySQL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b95075a2843b" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/ep2-designing-rdbms-focus-on-your-core-feature-b95075a2843b">Ep2.Designing RDBMS: Focus on Your Core Feature</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ep 1. Backend Development(AWS EC2, MySQL, Node js)]]></title>
            <link>https://medium.com/@lovelyalice.kim/ep-1-backend-development-aws-ec2-mysql-node-js-fb847050ed87?source=rss-13eadb1bc4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb847050ed87</guid>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[AliceHeeyeon Kim]]></dc:creator>
            <pubDate>Wed, 05 Jun 2024 08:56:01 GMT</pubDate>
            <atom:updated>2024-06-20T05:39:19.550Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s build a backend server by working on an actual project.</p><p>Before we start, just let you know guys- I am a Mac user, so it might be slightly different if you are using Window OS.</p><p>If you read my last (and first) blog, you already saw this flow diagram. For this project, I am going to utilize Nginx, MySQL, and Node.js, and it will be running on AWS EC2. It’s like borrowing a computer from AWS to run the server on the cloud for easy deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrGWWH-0RpRbburnMudkHg.png" /></figure><h3>1–1. Create an EC2 instance</h3><p>If you don’t have AWS account, create one. They allow quite generous free tier usage, and it’s enough for our practice project.</p><p>In your AWS console, search <strong>EC2</strong>, then you can find the service easily.</p><p>On the left panel, click <strong>Instances</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*kQCPsA5D1mhf3hVMHxvkkg.png" /></figure><p>Then, Click the orange button <strong>Launch instances</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/153/1*_eKxxpjlDo3yYhswfKre5w.png" /></figure><p>You will see a <strong>Launch and instance</strong> page. <strong>Set the instance name</strong> as you like, and choose<strong> Ubuntu</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*DHA7Z5KUhYWOIxNffc3oEQ.png" /></figure><p>For Key pair(login), choose <strong>Create new key pair</strong> and <strong>enter key pair name</strong>(any name is okay, but no spaces). Set the Key file format to .<strong>ppk</strong> as we are going to use <strong>PuTTY</strong> later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*YN5mquUhcj9dT4CYSUlhUA.png" /></figure><p>Once you create key pair, it will automatically be downloaded to your computer. You will need it when you access EC2. Now, select the key pair that you created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*fhumKKJ7B-KRCgG0r7icAw.png" /></figure><p>In the Network settings, I allowed SSH and HTTP to enable access from the terminal and browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*e6cXUYVvJPjTNb8rqPVwUg.png" /></figure><p>Everything else is fine to leave as default. Click <strong>Launch instance</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*uddX_18_U8VBwnIqxof1sg.png" /></figure><p>An EC2 instance launched in just a few clicks. Yay! 🎊</p><h3>1–2. Allocate Elastic IP address</h3><p>Now, our EC2 instance has a little problem because the public IPv4 address changes every time we reboot the instance. Therefore, we need an Elastic IP to fix the address.</p><p>On your left panel, find Network &amp; Security — <strong>Elastic IPs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/157/1*CHVAQ3ZgZFwmqCbci6v8FQ.png" /></figure><p>Click the orange button, <strong>Allocate Elastic IP address</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*o8XxMspbagnVFu3KScWzzQ.png" /></figure><p>Nothing to change, just click <strong>Allocate</strong></p><p>Choose the created the IP address, then click <strong>Actions — Associate Elastic IP address</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FYGHiuZBxLTRlT9xvZ7nYg.png" /></figure><p>Find the instance that you created, click <strong>Associate</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*Lbj6joBuAdiBzzf8MCijYg.png" /></figure><p>Now your IP has changed to the Elastic IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DoF19CS4xse5ixqibHompg.png" /></figure><h3>1–3. Add Inbound rules for MySQL</h3><p>Since we have only added security rules for SSH and HTTP, we need to allow another inbound rule to access MySQL.</p><p>Click on the instance and navigate to the Security tab. Find the security groups and click on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*_h7SWAphjPXgOtwVUzm-KQ.png" /></figure><p>Click the <strong>Edit inbound rules</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aeijc8Yywxa36TTcUFApKQ.png" /></figure><p><strong>Add rule </strong><br>Type : MYSQL/Aurora<br>Source: Anywhere-IPv4</p><p>Then,<strong> Save rules</strong></p><h3>2–1. Access EC2 through PuTTY</h3><p><strong>Install PuTTY</strong> following this instruction <a href="https://phoenixnap.com/kb/install-putty-on-mac">HOW TO INSTALL PUTTY</a></p><p>If you create a shortcut on desktop, <strong>double click the icon</strong></p><p>or</p><p>You can access via terminal. Open mac terminal, and type <strong>putty</strong></p><p>Then you will see this window. <br>Host Name is <strong>ubuntu@your IP address</strong><br>For Sessions, write <strong>Ubuntu</strong> and save</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*Llr5MNe9M4AV5wzGOab3yw.png" /></figure><p>NOW, you need the key pair of your EC2 instance</p><p>On the left side, find <strong>SSH — Auth — Credentials</strong><br>Then Browse for your key on your computer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDbJBJeG2IF2XPVk_jjUmQ.png" /></figure><p>Click <strong>Open</strong>. If your key matched your EC2 instance, you will see this terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*57wABgj43L9wnjPtF0GJWA.png" /></figure><h3>2–2. Install Nginx, Node js and MySQL on EC2 instance</h3><p>First, in order to switch the current user to the superuser (root) account, type this following commands.</p><p><strong><em>sudo su</em></strong></p><p>To ensure that our system is aware of the latest versions of software packages available from the repositories,</p><p><strong><em>apt-get update</em></strong></p><p>Let’s install Nginx.</p><p><strong><em>apt-get install nginx</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*cpWeDoPzSx6Xr1SYUaQ28g.png" /></figure><p>Go back to your AWS console, and copy your EC2 IPv4 address. <br>Paste it into the address bar of new browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*6cL7Quw-1gySqhmZTiqiMw.png" /></figure><p>If you see this message, it means Nginx has been installed successfully👏🏻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*44FiXs0cpHGjtvJOw2aiJg.png" /></figure><p>Let’s install Node js and npm.</p><p><strong><em>apt-get install nodejs<br>apt install npm</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*76eydtdQJGd-0oZbDRgHLQ.png" /></figure><p>If you see this while installing, just type<strong><em> </em>y</strong></p><p>Check the version of them</p><p><strong><em>node -v<br>npm -v</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*23FN69eQiNegbcdMvf0TFg.png" /></figure><p>It’t time to install MySQL</p><p><strong><em>apt-get install mysql-server</em></strong></p><p>If you successfully install, start a MySQL client session by typing</p><p><strong><em>mysql -u root -p</em></strong></p><p>It will ask for a password, but there is no password set yet. just press <strong>Enter</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*Q9nw1GWMtHX7EhPQKSZHCA.png" /></figure><p>Create a user ‘root’ that can connect from any host, and grant privileges.</p><p><strong><em>CREATE USER ‘root’@’%’ IDENTIFIED BY ‘your new_password’;<br>GRANT ALL PRIVILEGES ON *.* TO ‘username’@’%’;<br>FLUSH PRIVILEGES;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*V9LSzkxeXxzeyG27pzf-OA.png" /></figure><p><em>****SQL commands in MySQL are not case-sensitive, so they do not have to be in capital letters. However, it is a common convention to write SQL keywords in uppercase for readability and to distinguish them from table and column names.****</em></p><p>Exit SQL for the next step.</p><p><strong><em>Exit;</em></strong></p><h3>2–2. Allow Remote Connections to MySQL Server.</h3><p>This is final step of the MySQL server configuration.</p><p>MySQL sets its default IP address to 127.0.0.1, which means it only listens for local connections. To allow MySQL to listen for connections from any IP address, we’ll change this value to 0.0.0.0</p><p>The location of the MySQL configuration file depends on your Linux distribution. <br>In Ubuntu and Debian, it is located at <strong><em>/etc/mysql/mysql.conf.d/mysqld.cnf</em></strong> <br>In Red Hat-based distributions like CentOS, it is found at <strong><em>/etc/my.cnf</em></strong></p><p><strong><em>sudo nano</em></strong> <strong><em>/etc/mysql/mysql.conf.d/mysqld.cnf</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*mm9ubdcp8iAjVbF2UfrPUw.png" /></figure><p>Find the bind-address setting and change its value to 0.0.0.0<br><strong><em>Ctrl + x</em> </strong>and type<strong><em> “y</em></strong> “ to save.</p><p>To restart the MySQL service</p><p><strong><em>sudo systemctl restart mysql</em></strong></p><p>then, access MySQL</p><p><strong><em>mysql -u root -p</em></strong></p><p>If the password works, your MySQL is ready to use.👏👏👏👏👏👏</p><p>What I covered in this post :</p><ul><li>Create AWS EC2 instance</li><li>Allocate an Elastic IP to the EC2 instance</li><li>Add inbound rules for MySQL</li><li>Install Nginx, Node js and MySQL via PuTTY</li><li>Create a MySQL user, set up a password, and grant privileges</li><li>Allow remote connections to MySQL server</li></ul><p>For Next Ep2, I will talk about designing a MySQL schema.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb847050ed87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is backend and server?]]></title>
            <link>https://medium.com/@lovelyalice.kim/what-is-backend-and-server-efa533a9dd41?source=rss-13eadb1bc4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/efa533a9dd41</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[AliceHeeyeon Kim]]></dc:creator>
            <pubDate>Mon, 03 Jun 2024 04:09:47 GMT</pubDate>
            <atom:updated>2024-06-03T04:09:47.382Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever experienced trouble sending a message? Or has your favourite game stopped working even though there’s no problem with your computer or internet? If so, you have already know what happen if a server has a problem.</p><p>A server basically responds to client requests. Let’s apply this concept to a restaurant situation.</p><p>When a customer orders pasta, the hall staff requests the chef to prepare it. The chef needs ingredients such as linguine, meat, sauces, and more. There’s an intelligent refrigerator that sends exactly the ingredients the chef asks for. After cooking the pasta, the chef hands it to the hall staff, and finally, the pasta is served to the customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QoGJxRXMTsuLEwt3bwVs-Q.png" /></figure><p>Similarly, in IT terms, when you send a request to a server (like sending a message or accessing a game), the server processes the request and sends back the necessary data. This is just like the chef preparing and sending the pasta to the customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qnvj0xtwPuc_8JNIaTzBrg.png" /></figure><p>Here’s common program of each term</p><ol><li>Client <br>- Web browser<br>- Android, ios<br>- Game</li><li>Server<br>- Apache<br>- Nginx<br>- Tomcat</li><li>Backend<br>- ASP, JSP, PHP<br>- Node.js(Express)<br>- Python(Django)</li><li>Database<br>- MySQL<br>- MS SQL<br>- Oracle<br>- MongoDB</li></ol><p>Okay, now let’s dive a little deeper into how they network.<br>In the IT world, everything operates via the internet. Therefore, it’s essential to have some network-related knowledge to understand how requests and responses work.</p><p>Let’s revisit the restaurant scenario, but imagine it as an online order.</p><p>If a customer (client) wants to place an order, they need to know the restaurant’s address first. In IT terms, this <strong>address is the IP</strong>.</p><p>An IP address consists of numbers like 3.36.43.123. However, this isn’t very user-friendly, so we use <strong>domain</strong> names like www.google.com instead.</p><p>At the restaurant, there are different entrances based on the way of communicate (protocol), and each door (port) has a number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*fYZdUDlYuaHJBDfpRLV0BA.png" /></figure><p>In the IT world, developers set customary port numbers for protocols, but these are not strict rules that must be followed.</p><p>Protocol / Port<br>- HTTP 80<br>- HTTPS 443<br>- SSH 22<br>- SFTP 22<br>- FTP 21<br>- MySQL 3306</p><p>HTTP and HTTPS are protocols for general clients, while the others are used by admins to access other computer terminals or for tasks that require special permissions.</p><p>In summary,</p><ul><li>For a client to access a server, they needs to know the server’s address.</li><li>This address can be represented by an <strong>IP</strong> or a <strong>domain</strong> name.</li><li>Once the address is known, the client must decide which door to enter through, and that door is the <strong>PORT</strong>.</li><li>After entering through the door, the client must determine how to communicate with the server, which is defined by the <strong>protocol</strong>.</li><li>There are various types of protocols, but the ones commonly used by general users are <strong>HTTP</strong> and <strong>HTTPS</strong>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efa533a9dd41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>