<?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 ssali2022 on Medium]]></title>
        <description><![CDATA[Stories by ssali2022 on Medium]]></description>
        <link>https://medium.com/@salianovaj?source=rss-4cafc5d98a7e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8iJtPVooiD98ud7n</url>
            <title>Stories by ssali2022 on Medium</title>
            <link>https://medium.com/@salianovaj?source=rss-4cafc5d98a7e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 16 May 2026 18:05:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salianovaj/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[JDBC]]></title>
            <link>https://medium.com/@salianovaj/jdbc-cd97f4630faa?source=rss-4cafc5d98a7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd97f4630faa</guid>
            <dc:creator><![CDATA[ssali2022]]></dc:creator>
            <pubDate>Thu, 01 Dec 2022 06:52:19 GMT</pubDate>
            <atom:updated>2022-12-01T06:52:19.617Z</atom:updated>
            <content:encoded><![CDATA[<p>Java Database Connectivity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*iB579PfnaYvXQLWQ02PKdA.png" /></figure><p>Why do we learn SQL? — To get data from DB manually, we can apply this knowledge to backend manual test.</p><p>We still didn’t connect our intelliJ with database with help of Java, we didn’t make database as part of our Framework yet.</p><p>So far we just connected our intelliJ with our amazon server via IP address, port#, credentials(user, password).</p><p>Now, we want to implement that connection of Database into our Framework. How that’s gonna happen?</p><p>Connection via IP address, port# and credentials are still needed, but it is still not enough to connect database to our framework. We need library, called JDBC. Do we need to add JDBC dependences into our Maven? — No. It comes with Java Standard Edition and gives us ability to connect database to our Framework.</p><p>Is there anyway to handle all types of drivers for DB like Bony Garcia? — No. But JDBC provides DriverManager (Class) for establishing connection with various DBs with the help of related Driver.</p><ul><li>To connect our Driver with any browser we have this flow:</li></ul><h4>JAVA → Selenium → WebDriver(Bony Garcia) → Chrome Browser</h4><h4>To connect Oracle DB with Driver we have this flow:</h4><h4>JAVA → JDBC → Oracle Driver → Oracle DB</h4><h4>If you want to use Postgres, you need to add Postgress Driver. If you want to use MySQL, you need to add MySQL Driver:</h4><p>JAVA → JDBC → Postgress Driver → Postgress DB</p><p>JAVA → JDBC → MySQL Driver → mySQL DB</p><ul><li>Which dependency we need to add? — We need to add Oracle Driver for Oracle DB.</li></ul><p>JDBC: is an industry standard for DB independent connectivity between Java and wide range of DBs.</p><p>JDBC comes with 2 packages:</p><ul><li>java.sql* — basic DB Communication:</li></ul><p><strong>→ interfaces: <em>Connection — Statement — ResultSet </em></strong>— <strong><em>ResultSetMetaData</em></strong><em> — DBMetaData..</em></p><p><strong>Connection </strong>to connect Java with DB</p><p><strong>Statement</strong> to write and execute queries</p><p><strong>ResultSet</strong> for table itself without table information</p><p><strong>ResultSetMetaData</strong> (Table data), for table information</p><p><strong>→ classes: </strong>DriverManager will help to connect with DB with its getConnection() method.</p><ul><li>javax.sql* — advanced DB communication</li></ul><p>STEPS TO CONNECT DB TO OUR FRAMEWORK:</p><ol><li>At Java (green folder) level create new package:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*f4NlfA8-M90soBbO8qMUSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*hv4HcWLm9g_4RZt4eGAk-g.png" /></figure><p>2. We need to add one driver. What type of DB we’ve been using so far? — Oracle. So we need to add Oracle dependency into my Maven pom.xml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*NfsbLCwUkdexA878ImEX7g.png" /></figure><p>As we mentioned before we need specific Driver to connect to specific DB. In our UI automation framework we used Bony Garcia to handle all types of drivers in one place in order to connect from our framework. However, for backend automation framework, there is no such manager like Bony Garcia, therefore we have to add each driver one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*wLRRrvgczL9gapXpcItdFg.png" /><figcaption>create new class at jdbcTest level</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*mh7M1iBG3h-UIBB69FpESA.png" /></figure><p>3. Connection Stream: In order to test DB using JAVA, first we connect DB via <strong>Connecting String</strong>, which includes URL — Username — Password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*h9aU84_ppOxMNfiR9TgMSw.png" /></figure><p>We will create String dbUrl, but where do we get it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*q_tmc3-3Ed-BSQr0HAuhFw.png" /><figcaption>COPY and PASTE inside double quotation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*QMtRCR9zVf66ANOWrzlONw.png" /><figcaption>1. Connection: helps Java project connect to DB; 2. Statement; helps to execute SQL query; 3. ResultSet: is a Data structure to store data coming from DB.</figcaption></figure><p>4. Now we can connect with the help of Connection interface and DriverClass, we use getConnection() method to establish this connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*BVMfMDum2NLNsOs5Gd8Agw.png" /></figure><p>5. After we successfully created connection, next step is to create the Statement Object from Connection for query excecution by using createStatement() method coming from Statement interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*736jy0P1hg1zAtqkIObqPQ.png" /></figure><p>6. Once we have Statement we can run our query and get result in ResultSet format (it will keep data from execution).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*ZoO0CKom2AwCECwCci2_og.png" /><figcaption>SETUP flow: Left side of equation — Interfaces, Right side of the equation — methods</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*37nKdp0QrSZ5ZzLf8a6EqA.png" /></figure><p>7. After we done we always have to close our DB connection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*6xMvUdWGdiAxvhchkezcjA.png" /></figure><p>MOVE ROWS UP/DOWN. Getting Data from DB— ResultSet</p><p>8. What does ResultSet do? It keeps only information from Table Data. Hold only data itself and doesn’t have any information about # of columns, column names or count.</p><p>In order to access data in ResultSet Object, we use cursor navigation methods. There are 7 methods available for navigation purposes:</p><p><strong>==&gt; next()</strong>; — move to the next row and return Boolean value based on row availability/existence</p><p>By default the pointer shows “before -first -row”, but we need next row which is actual 1st row, so we will use next() method to achieve this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*pEJ2a-wDm5WGjv6Zav5UCg.png" /></figure><p><strong>==&gt; last();</strong> — move to the last row from anywhere.</p><p>Note: as of now our Statement is setup for FORWARD only navigation, that means our cursor is not flexible. To be able to move it to the last row, we need to make small adjustments in our Statement constructor by passing two arguments: ResultSet.TYPE_SCROLL_INSENSITIVE (for making cursor flexible) &amp; ResultSet.CONCUR_READ_ONLY (permit to read only).</p><p><strong>==&gt; absolute(int); </strong>— move to specified row, returns Boolean value based on row availability/existence. To make sure you are printing needed data, you can check table manually and print that specific row data and row number using methods above:</p><p><strong>==&gt; previous();</strong> — move to previous row, returns Boolean value based on row availability.</p><p><strong>==&gt; beforeFirst();</strong> — move to the top →before-first-row position</p><p><strong>==&gt; afterLast();</strong> — move to after last location from anywhere</p><p><strong>==&gt; first(); </strong>— move to the first row position from anywhere</p><p><strong>MOVE COLUMNS LEFT →RIGHT.</strong></p><p>9. <strong>ResultSetMetaData. JDBC MetaData programming </strong>supports:</p><ul><li>DatabaseMeta (information about DB itself)</li><li>ResultSetMetaData (information about the table: column names, # of columns etc)</li></ul><p>We will focus on ResultSetMetaData. It is responsible for the top of the table, which is the table column information. RSMD is used to get column info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OlNkiEGNsQ5TSwgnijLlVg.png" /></figure><p><strong>How can we store these data?</strong></p><p>We need to get each row into Map using columnNames as Key. Each Cell value will be the value of each related Key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*qpYKXm1fxLhpGtLnly-5sA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r9-3sG8MbdX-xa1Ng-06Tg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd97f4630faa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SET OPERATORS IN SQL]]></title>
            <link>https://medium.com/@salianovaj/set-operators-in-sql-3c4a80e62ac3?source=rss-4cafc5d98a7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c4a80e62ac3</guid>
            <category><![CDATA[unions]]></category>
            <category><![CDATA[minus]]></category>
            <category><![CDATA[intersect]]></category>
            <category><![CDATA[union-all]]></category>
            <category><![CDATA[set-operator-in-sql]]></category>
            <dc:creator><![CDATA[ssali2022]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 06:17:34 GMT</pubDate>
            <atom:updated>2022-11-27T06:17:34.701Z</atom:updated>
            <content:encoded><![CDATA[<p>UNION, UNION ALL, INTERSECT, MINUS</p><p>When do we use Set Operators and How those work?</p><p>For Set Operators to work we need:</p><ul><li>TWO Independent Queries*</li><li>Same [#<strong> columns</strong>] in SELECT(clause)</li><li>Same Data Type in the Same Order</li></ul><p>*Note: Independent Queries must be different, both should have<strong> the same</strong> <strong>[# of columns]</strong> and the <strong>same</strong> <strong>data types</strong> in each corresponding column.</p><ol><li>UNION(operator): the main job is to combine result of two or more SELECTs(clauses) into a single set. It basically merges two tables vertically. It removes all duplicate rows and sort them based on ascending order.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*DARe85dbCQcVR3ANueYHuQ.png" /><figcaption>Table1 &amp; Table2 do not have any connection between, these are absolutely different independent queries.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*pvIBcS9HvRYbX7Q3kwJ7AQ.png" /></figure><p>2. UNION ALL: do not remove duplicates and do not sort results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*4rLgpmULSrajcG8c0haaeg.png" /></figure><p>3. MINUS: will only return data from 1st query that is not present/common in 2nd query, (it will subtract any duplicate values and return only unique ones for the 1st table). The order of tables does matter. So the focus is to extract unique data from the table you are looking to get info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*YpyUQIgaeK72lCPlSjiZMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*1Z8pLgz7QdabiiAByAJh_g.png" /></figure><p>4. INTERSECT: will return data that are present/common in both query results. It will sort and remove duplicates (will return only matching data).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*V1h7xqYV7pnStfTAH_-WbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*9dSN_rE9Gr1BFyfaGFj5Fw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c4a80e62ac3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inner, Outer & Self -Joins in SQL]]></title>
            <link>https://medium.com/@salianovaj/inner-outer-self-joins-in-sql-be4f744b6474?source=rss-4cafc5d98a7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/be4f744b6474</guid>
            <dc:creator><![CDATA[ssali2022]]></dc:creator>
            <pubDate>Sat, 26 Nov 2022 14:48:53 GMT</pubDate>
            <atom:updated>2022-11-26T14:48:53.455Z</atom:updated>
            <content:encoded><![CDATA[<p>This is my day 4 studying SQL and today I am focusing on Inner, Outer &amp; Self-Joins in SQL. We will see what is the difference between two and how we can benefit from them?</p><ul><li>What is the Inner Join?</li></ul><p>INNER JOIN(clause) is a command that has only one job — to get matching data from two+ tables. This clause is placed between let’s say <em>table1</em> &amp; <em>table2+</em>, and it will check if there is any connection between them, it will go over all rows from all tables and as a result will return you only rows with matching data.</p><ol><li>After SELECT(clause) we need to define TableName.ColumnName</li><li>After FROM(clause) we define <em>table1</em> <strong>INNER JOIN(</strong>clause<strong>)</strong> <em>table2. </em>We want to get data from both tables.</li><li>After ON(clause) <strong>set condition to be matched from both tables</strong> in order to extract our data from: Table1.columnName <strong>=</strong> table2.columnName.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1xd8BJckx99Uk5a2Sm7yxQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*rHvBWU9aiDx7c3XkkIFb8w.png" /></figure><ul><li>LEFT OUTER JOIN</li></ul><p>This clause will return <strong>matching part</strong> &amp; <strong>unique</strong> for Left Table, therefore keep in mind that table order is important:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lO3MWSPLgW3pnfyIcbS3w.jpeg" /><figcaption>If there is no match, the right side will contain NULL</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*gIsgFWnXUATnd_tRhyvVlg.png" /><figcaption><strong>Because left join says if you are using left join you need to put your table to the left side, If you want to get unique sections from the customer table as well.</strong></figcaption></figure><ul><li>LEFT OUTER JOIN with WHERE(clause) will look for unique data coming only from Left Table without looking for any matching data with Right Table. We perform the same Left Join, then with help of WHERE(clause) exclude data we don’t want from Right Table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*JZU3x0n52_ciLA-gKjelLw.png" /><figcaption>If you don’t have matching data from the right side from the address table, it means it is unique for <strong>the customer table.</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*pmO2LdszbmQZCgiP-6C3Aw.png" /><figcaption>we use NULL value as a base to be able to identify UNIQUE data</figcaption></figure><ul><li>RIGHT OUTER JOIN.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wcGDRb1sjAjj7Y9OXKGBw.png" /></figure><p>If we want to get info for <strong>matching portion, &amp; unique data</strong> from Address table, and if we want to use Address as a Right side, we’d use RIGHT OUTER JOIN, if we want to use Address as a Left side, we’d use LEFT OUTER JOIN. Result would be the same in both cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Lwo47b4oM4aORZgM4kWiiw.png" /></figure><ul><li>SELF-JOIN(clause) joins table to <strong>itself</strong>. Purpose - we use this clause when we want to combine one row with anther row within <strong>the same table</strong>. How to use — we must use <strong>table alias</strong> for referencing purposes, differing one row-to-be-table from another within the same table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*ESf7hvo2b3eDXDpi3THT2w.png" /><figcaption>If the manager_id equals the employee_id, give me the information</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6wMmFziv3I3MT3LtsoeHA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be4f744b6474" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Database Practice]]></title>
            <link>https://medium.com/@salianovaj/sql-database-practice-839689525c28?source=rss-4cafc5d98a7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/839689525c28</guid>
            <dc:creator><![CDATA[ssali2022]]></dc:creator>
            <pubDate>Thu, 24 Nov 2022 12:44:34 GMT</pubDate>
            <atom:updated>2022-11-24T12:44:34.693Z</atom:updated>
            <content:encoded><![CDATA[<p>We will do some practice on data manipulation with involving Queries.</p><ol><li><strong>Find 3ed max salary from employees’ table (exclude any duplicates).</strong></li></ol><p>Note: If you don’t know where to start from, try to divide your task into small steps:</p><ul><li>First, we need to sort salary in descending order and get rid of all duplicates:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*HHCpWhF96LRm2Ri62zXJBg.png" /></figure><ul><li>Second part includes 2 steps to implement: <strong>one</strong> is to pass inside of the parentheses the query defined in step 1 after FROM(clause), <strong>two</strong> is to cut the row from line 3:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*tc3c7BQAIlEYwKuUSjSLbQ.png" /><figcaption>One is to pass inside of parentheses() the query defined in step1 after FROM(clause)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*KI7nzMG1plrqQzI-30nVsA.png" /><figcaption>Two is to cut your row line by using ROWNUM(clause)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*QDqjiJlVV_aLYKDALx0-YQ.png" /><figcaption>you will left over with 3 lines of rows where 3ed one is the minimum salary</figcaption></figure><ul><li>Now we can easily get 3ed minimum salary by just simply adding <strong>MIN(SALARY)</strong> instead of <strong>(*</strong>) at <strong>SELECT</strong> level:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*WQDjXVioPn77unMkXi9Y2A.png" /><figcaption>Step 2</figcaption></figure><ul><li>Finally we can get <strong>all </strong>information of the employee who is getting 3ed highest salary:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4wzPg-V9ngek5jV5uoB60w.png" /><figcaption>This is Dynamic solution in defining required data, that’s why we use — select * from Employees —</figcaption></figure><p>2. Find 3ed minimum salary from employees table (do not include duplicates): Hey, guys, you can try now do this in 3 steps and remember that 3ed step has <strong>three</strong> actions like to distinct, sort and cut the row lines:)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9v546ugewJY2CvZXxLzrzg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=839689525c28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DDL & DML in SQL]]></title>
            <link>https://medium.com/@salianovaj/ddl-dml-in-sql-780ead0f8805?source=rss-4cafc5d98a7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/780ead0f8805</guid>
            <category><![CDATA[create-table]]></category>
            <category><![CDATA[ddl]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[dml]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[ssali2022]]></dc:creator>
            <pubDate>Wed, 23 Nov 2022 08:55:07 GMT</pubDate>
            <atom:updated>2022-11-23T08:55:07.965Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL Studying journey from QA perspective</h3><p>DDL &amp; DML (Interview Related Question — personal preparation)</p><p>What does DDL stand for? — Data Definition Language (its about <strong>Table</strong> manipulation).</p><p>Why we need it? — it helps us to define DATA Structures with using special keywords:</p><ul><li>CREATE</li><li>DROP</li><li>TRUNCATE</li><li>ALTER</li></ul><p>What does DML stand for? Data Manipulation Language (its about <strong>Data</strong> manipulation).</p><p>Why we need it? — it helps us to define Data itself by using special keywords:</p><ul><li>SELECT</li><li>INSERT</li><li>UPDATE</li><li>DELETE</li></ul><p>Note: as a QA Tester, you do not have any responsibilities in creating this data, just know it how it works and that’s by itself more than enough.</p><p>The Plan is to create a table, add couple of data, delete and update that data. So how it works? What’s the syntax and the flow?</p><ol><li>First, type <strong>CREATE TABLE</strong> statement/clause to create a new SQL table:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*A4gms1jK0VbxKNKm4k326Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*ttGcJwbz4PvXWWsfU12HAw.png" /></figure><p>2. Name your new table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*1ExmWTxbBFib6lQPNwhfQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*blaN3_hfF7IkOx4puYHucQ.png" /></figure><p>3. List the column name, its data type, and column constraint. You can have multiple columns in the table, each column has to be separated by a comma(,). The column constraint applies certain rules for the column e.g., NOT NULL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*4KvHRO-lnm_WVrd1Jw_kRg.png" /></figure><p><strong>Column Constraints rules:</strong></p><ul><li>NOT NULL — the value of the column can not be NULL.</li><li>UNIQUE — the value of the column must be unique across the whole table.</li><li>PRIMARY KEY — combination of the both NOT NULL and UNIQUE(can not be duplicate) constraints.</li><li>REFERENCES — Other table (PKColumn) — its a foreign key being used as a <strong>reference</strong> in other table as a result of being primary key in the referencing table.</li></ul><p>NOTE: YOU CAN NOT HAVE FOREIGN KEY WITHOUT HAVING IT AS PRIMARY KEY FIRST IN RELATED TABLE. FOREIGN KEY IS BASICALLY THE PRIMARY KEY BUT USED IN OTHER TABLE AS REFERENCE.</p><ul><li>CHECK — adds extra layer of restriction, ensures all data entries satisfy precise conditions set upward. It will throw error message in case conditions are not met.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRkugxOA5mesk9ZeR3wnHg.png" /><figcaption>This is EMPTY table, NO Data yet</figcaption></figure><p>4. Insert/add new rows (one at a time) into your new table by INSERT — INTO tableName(column1, column2,..) — VALUES(value1, value2,..) clause</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oGGGwlM3mbV22eYB6bSkxw.png" /><figcaption>Insertion diagram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*dSNQ4RQ7y0HNMVYdJkZAMg.png" /><figcaption>Inserting Data into new table</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*QYvorUfexCNzxT58DNPbNw.png" /><figcaption>Changes after running new data</figcaption></figure><p>5. COMMIT(clause) after all insertion is done, otherwise it will not be entered in database:<strong> commit; or commit work;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*KBf28ExMS8JUrgtHvY-0rA.png" /></figure><p>6. UPDATE(clause) will help to save any changes in your table. Lets increase salary for all employees by 10K each:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*YnxPpR7m_Cmoo_bgjq7uug.png" /></figure><p>7. WHERE(clasue) is used when you want to specify certain data you want to change. Lets change/UPDATE salary only for Testers by +25K for each Tester:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*NrEM-QmWwBYDQVCvqCYr4w.png" /></figure><p>8. DELETE(clause) will remove data you specify FROM(clause) your table WHERE(clause) you need to specify certain data. You always want to DELETE data that MAKES SENSE. If you have multiple Mikes and you want to delete one of them, employeeID is your WHERE condition to be removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d1Jpbe7Uv8CeXxtbFyAPzA.png" /></figure><p>9. ALTER TABLE(clause) is coming from DDL(table related manipulations). You can do following manipulations with it:</p><ul><li>RENAME TO: will rename your table into newTableName. Lets rename our “scrumTeam” to “bestTeam”:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*IAOqXs-KszYNPVeXOQ9aWg.png" /></figure><ul><li>ADD COLUMN: will add column to the table. Lets add column “Gender” to our just renamed table “bestTeam”:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jaF4wiDjKVgGffqRS9zaA.png" /></figure><ul><li>RENAME COLUMN: will rename column name. Lets rename “Salary” column to “Annual_Salary”:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nfslhh56GI-_Wnj90s1Jvw.png" /></figure><ul><li>DROP COLUMN: will drop the column from the table. Lets drop “Gender” column from the table:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lf7nn74H3w33cqJLO93Txw.png" /></figure><p>10. TRUNCATE(clause) will remove all data from table BUT NOT the table itself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TU-OXwjz4itbbIpVqaLFKA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=780ead0f8805" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>