<?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 Rishil Aman  on Medium]]></title>
        <description><![CDATA[Stories by Rishil Aman  on Medium]]></description>
        <link>https://medium.com/@rishilaman?source=rss-f5fa0fd48225------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LljofsnhMhPXIGst</url>
            <title>Stories by Rishil Aman  on Medium</title>
            <link>https://medium.com/@rishilaman?source=rss-f5fa0fd48225------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:57:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rishilaman/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[JOINS IN SQL]]></title>
            <link>https://medium.com/@rishilaman/joins-in-sql-ddd11ab2fe21?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd11ab2fe21</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 03:19:21 GMT</pubDate>
            <atom:updated>2026-08-11T03:19:21.715Z</atom:updated>
            <content:encoded><![CDATA[<p>The process through which data from multiple tables is retrieved simultaneously is known as JOIN.</p><p>WHY AND WHEN DO WE USE JOIN?</p><p>Whenever the attributes to be selected are present in both tables, we use JOIN.</p><p><strong>TYPES OF JOIN</strong></p><p>1. Cartesian Join / Cross Join<br>2. Inner Join<br>3. Outer Join<br> — Left Outer Join<br> — Right Outer Join<br> — Full Outer Join<br>4. Self Join<br>5. Natural Join</p><p><strong>CARTESIAN JOIN / CROSS JOIN</strong></p><p>In a Cartesian Join, each record from Table 1 will be merged with all the records of Table 2.</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>CROSS JOIN table2;</p><p>ORACLE SYNTAX:</p><p>SELECT *<br>FROM table1, table2;</p><p>NOTE:</p><p>We don’t use CROSS JOIN as it gives us more false records than true records.</p><p>We use it while performing permutation and combination.</p><p><strong>INNER JOIN</strong></p><p>An INNER JOIN is used to obtain only matching records.</p><p>A matching record is a record which has a pair in the other table.</p><p>JOIN CONDITION</p><p>A JOIN condition is a condition on which two tables are merged.</p><p>For example:</p><p>Table 1 → Column 1<br>Table 2 → Column 2</p><p>The join condition is generally written as:</p><p>Table1.column1 = Table2.column2</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>INNER JOIN table2<br>ON table1.column1 = table2.column2;</p><p>ORACLE SYNTAX:</p><p>SELECT *<br>FROM table1, table2<br>WHERE table1.column1 = table2.column2;</p><p><strong>OUTER JOIN</strong></p><p>An OUTER JOIN is used to obtain unmatched records along with matching records.</p><p><strong>LEFT OUTER JOIN</strong></p><p>A LEFT OUTER JOIN is used to obtain unmatched records from the left table along with matching records.</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>LEFT OUTER JOIN table2<br>ON table1.column1 = table2.column2;</p><p>ORACLE SYNTAX:</p><p>SELECT *<br>FROM table1, table2<br>WHERE table1.column1 = table2.column2(+);</p><p><strong>RIGHT OUTER JOIN</strong></p><p>A RIGHT OUTER JOIN is used to obtain unmatched records from the right table along with matching records.</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>RIGHT OUTER JOIN table2<br>ON table1.column1 = table2.column2;</p><p>ORACLE SYNTAX:</p><p>SELECT *<br>FROM table1, table2<br>WHERE table1.column1(+) = table2.column2;</p><p><strong>FULL OUTER JOIN</strong></p><p>A FULL OUTER JOIN is used to obtain unmatched records from both the left and right tables along with the matching records.</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>FULL OUTER JOIN table2<br>ON table1.column1 = table2.column2;</p><p><strong>SELF JOIN</strong></p><p>Joining a table by itself is known as SELF JOIN.</p><p>WHY AND WHEN DO WE USE SELF JOIN?</p><p>Whenever the data to be selected is present in the same table but in different records, we use SELF JOIN.</p><p>For example, when we want to establish an Employee and Manager relationship using the same Employee table.</p><p>ANSI SYNTAX:</p><p>SELECT e.employee_name, m.employee_name<br>FROM Employee e<br>JOIN Employee m<br>ON e.manager_id = m.employee_id;</p><p>ORACLE SYNTAX:</p><p>SELECT e.employee_name, m.employee_name<br>FROM Employee e, Employee m<br>WHERE e.manager_id = m.employee_id;</p><p><strong>NATURAL JOIN</strong></p><p>A NATURAL JOIN behaves as an INNER JOIN if there is a relationship between the two tables; otherwise, it behaves as a CROSS JOIN.</p><p>There is no separate Oracle-specific syntax for NATURAL JOIN.</p><p>ANSI SYNTAX:</p><p>SELECT *<br>FROM table1<br>NATURAL JOIN table2;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd11ab2fe21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SUBQUERY]]></title>
            <link>https://medium.com/@rishilaman/subquery-9351084cf3d0?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/9351084cf3d0</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 03:49:14 GMT</pubDate>
            <atom:updated>2026-08-10T03:49:14.067Z</atom:updated>
            <content:encoded><![CDATA[<p>A query written inside another query is known as a Subquery.</p><p>There are two queries in a subquery:<br>1. Inner Query<br>2. Outer Query</p><p><strong>WORKING PRINCIPLE OF SUBQUERY</strong></p><p>Let us consider two queries: Outer Query and Inner Query.</p><p>1. The Inner Query executes first and produces an output.<br>2. The output of the Inner Query is given as input to the Outer Query.<br>3. The Outer Query then generates the final result.</p><p>Therefore, we can say that the Outer Query is dependent on the Inner Query.</p><p>This is the execution principle of a Subquery.</p><p><strong>BASIC SYNTAX</strong></p><p>SELECT column_name<br>FROM table_name<br>WHERE column_name = (<br> SELECT column_name<br> FROM table_name<br> WHERE condition<br>);</p><p><strong>USES OF SUBQUERY</strong></p><p>CASE 1:</p><p>Whenever we have an unknown value present in the question, we use a subquery to find the unknown value.</p><p>CASE 2:</p><p>Whenever the data to be selected and the condition to be executed are present in different tables, we use subqueries.</p><p><strong>TYPES OF SUBQUERY</strong></p><p>There are mainly two types of subqueries:</p><p>1. Single-Row Subquery<br>2. Multi-Row Subquery</p><h4><strong>SINGLE-ROW SUBQUERY</strong></h4><p>If the subquery returns exactly one record or value, we call it a Single-Row Subquery.</p><p>If it returns only one value, then we can use the normal operators or the special operators to compare the value.</p><p>Example:</p><p>SELECT *<br>FROM Employee<br>WHERE Salary &gt; (<br> SELECT Salary<br> FROM Employee<br> WHERE Employee_ID = 1<br>);</p><p>Here, the inner query returns one value, so it is a Single-Row Subquery.</p><p><strong>MULTI-ROW SUBQUERY</strong></p><p>If the subquery returns more than one record, we call it a Multi-Row Subquery.</p><p>If it returns more than one value, then we cannot use normal operators directly. We have to use special operators to compare the values.</p><p>The important special operators are:</p><p>1. ALL<br>2. ANY</p><p><strong>SUBQUERY OPERATORS</strong></p><p><strong>ALL</strong></p><p>ALL is a special operator used along with relational operators to compare the value with the values present on the right-hand side.</p><p>The ALL operator returns TRUE if the comparison condition is satisfied for all the values returned by the subquery.</p><p>Syntax:</p><p>SELECT column_name<br>FROM table_name<br>WHERE column_name &gt; ALL (<br> SELECT column_name<br> FROM table_name<br> WHERE condition<br>);</p><p><strong>ANY</strong></p><p>ANY is a special operator used along with relational operators to compare the value with the values present on the right-hand side.</p><p>The ANY operator returns TRUE if the comparison condition is satisfied for at least one value returned by the subquery.</p><p>Syntax:</p><p>SELECT column_name<br>FROM table_name<br>WHERE column_name &gt; ANY (<br> SELECT column_name<br> FROM table_name<br> WHERE condition<br>);</p><p><strong>NESTED SUBQUERY</strong></p><p>A subquery written inside another subquery is known as a Nested Subquery.</p><p>In Oracle, we can nest up to 255 levels of subqueries.</p><p>Example:</p><p>SELECT *<br>FROM table1<br>WHERE column1 = (<br> SELECT column2<br> FROM table2<br> WHERE column2 = (<br> SELECT column3<br> FROM table3<br> )<br>);</p><p><strong>EMPLOYEE AND MANAGER CONNECTION</strong></p><p>To find the manager and employee relationship:</p><p>- To find the manager, the manager’s information should be in the subquery.<br>- To find the employee, the employee number should be in the subquery.</p><p>This concept can be used to establish the relationship between an employee and their manager using a subquery.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9351084cf3d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GROUP BY AND HAVING CLAUSE]]></title>
            <link>https://medium.com/@rishilaman/group-by-and-having-clause-464bbc9f2757?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/464bbc9f2757</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Sat, 08 Aug 2026 03:17:10 GMT</pubDate>
            <atom:updated>2026-08-08T03:17:10.346Z</atom:updated>
            <content:encoded><![CDATA[<h3>GROUP BY Clause</h3><p>The <strong>GROUP BY</strong> clause is used to <strong>group the records</strong>.</p><h3>Syntax</h3><p>SELECT column_name, aggregate_function(column_name)<br>FROM table_name<br>WHERE condition<br>GROUP BY column_name;</p><h3>Order of Execution</h3><p>The order of execution is:</p><p><strong>FROM → WHERE → GROUP BY → SELECT</strong></p><h3>Important Notes</h3><ul><li><strong>GROUP BY</strong> clause is used to group the records.</li><li>The <strong>GROUP BY</strong> clause processes the rows and forms groups based on the specified column or expression.</li><li>After the execution of the <strong>GROUP BY</strong> clause, we get <strong>groups</strong>.</li><li>Therefore, any clause that executes after <strong>GROUP BY</strong> must work <strong>group by group</strong>.</li><li>The <strong>column name or expression used for grouping</strong> can be used in the <strong>SELECT</strong> clause.</li><li><strong>GROUP BY</strong> clause can be used <strong>without using the WHERE clause</strong>.</li></ul><h3>HAVING Clause</h3><p>The <strong>HAVING</strong> clause is used to <strong>filter the groups</strong>.</p><h3>Syntax</h3><p>SELECT column_name, aggregate_function(column_name)<br>FROM table_name<br>GROUP BY column_name<br>HAVING condition;</p><h3>Order of Execution</h3><p>The order of execution is:</p><p><strong>FROM → WHERE → GROUP BY → HAVING → SELECT</strong></p><blockquote><strong><em>Important:</em></strong><em> </em><em>WHERE filters </em><strong><em>rows</em></strong><em>, whereas </em><em>HAVING filters </em><strong><em>groups</em></strong><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=464bbc9f2757" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functions in SQL]]></title>
            <link>https://medium.com/@rishilaman/functions-in-sql-cfe97b0a5bbd?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfe97b0a5bbd</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 05:04:44 GMT</pubDate>
            <atom:updated>2026-08-07T05:04:44.050Z</atom:updated>
            <content:encoded><![CDATA[<p>A <strong>Function</strong> is a block of code or a set of instructions that is used to perform a specific task.</p><h3>Types of Functions</h3><ol><li><strong>User-Defined Function (UDF)</strong></li><li><strong>Built-in (Predefined) Function</strong></li></ol><p>Built-in functions are further divided into two types:</p><ol><li><strong>Single Row Function</strong></li><li><strong>Multi-Row Function</strong></li></ol><h3>Single Row Function</h3><p>A <strong>Single Row Function</strong> works on <strong>one row at a time</strong>. It takes one input from each row, executes the function, and returns <strong>one output for each row</strong>.</p><p>If a table contains <strong>n rows</strong>, the function is executed <strong>n times</strong>, and it returns <strong>n outputs</strong>.</p><h3>Multi-Row Function</h3><p>A <strong>Multi-Row Function</strong> takes all the input values in one shot, executes them together, and returns a <strong>single output</strong>.</p><p>If you pass <strong>n number of input values</strong> to a multi-row function, it returns <strong>only one output</strong>.</p><h3>Types of Multi-Row Functions</h3><ol><li><strong>MAX()</strong></li><li><strong>MIN()</strong></li><li><strong>SUM()</strong></li><li><strong>AVG()</strong></li><li><strong>COUNT()</strong></li></ol><h3>MAX()</h3><p>The <strong>MAX()</strong> function is used to return the <strong>maximum value</strong> from a column.</p><h3>Syntax</h3><p>SELECT MAX(column_name)<br>FROM table_name;</p><h3>Example</h3><p>SELECT MAX(Salary)<br>FROM Employee;</p><h3>MIN()</h3><p>The <strong>MIN()</strong> function is used to return the <strong>minimum value</strong> from a column.</p><h3>Syntax</h3><p>SELECT MIN(column_name)<br>FROM table_name;</p><h3>Example</h3><p>SELECT MIN(Salary)<br>FROM Employee;</p><h3>SUM()</h3><p>The <strong>SUM()</strong> function is used to return the <strong>sum of all values</strong> in a numeric column.</p><h3>Syntax</h3><p>SELECT SUM(column_name)<br>FROM table_name;</p><h3>Example</h3><p>SELECT SUM(Salary)<br>FROM Employee;</p><h3>AVG()</h3><p>The <strong>AVG()</strong> function is used to return the <strong>average value</strong> of a numeric column.</p><h3>Syntax</h3><p>SELECT AVG(column_name)<br>FROM table_name;</p><h3>Example</h3><p>SELECT AVG(Salary)<br>FROM Employee;</p><h3>COUNT()</h3><p>The <strong>COUNT()</strong> function is used to count the number of records.</p><h3>Syntax</h3><p>SELECT COUNT(column_name)<br>FROM table_name;</p><p>or</p><p>SELECT COUNT(*)<br>FROM table_name;</p><h3>Example</h3><p>SELECT COUNT(Employee_ID)<br>FROM Employee;</p><h3>Important Notes</h3><ul><li>A <strong>Multi-Row Function</strong> can accept only <strong>one argument</strong>, which can be a <strong>column name</strong> or an <strong>expression</strong>.</li><li>Along with a <strong>Multi-Row Function</strong>, we are <strong>not supposed to use any other column name</strong> in the <strong>SELECT</strong> clause.</li><li><strong>Multi-Row Functions ignore NULL values.</strong></li><li>We <strong>cannot use Multi-Row Functions in the WHERE clause.</strong></li><li><strong>COUNT()</strong> is the only <strong>Multi-Row Function</strong> that can accept a <strong>string</strong> as an argument.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfe97b0a5bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DQL (Data Query Language)]]></title>
            <link>https://medium.com/@rishilaman/dql-data-query-language-94906a4ab69c?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/94906a4ab69c</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 06:49:48 GMT</pubDate>
            <atom:updated>2026-08-06T06:49:48.247Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>DQL (Data Query Language)</strong> is used to retrieve data from the database.</p><p>It has four statements:</p><ol><li><strong>SELECT</strong></li><li><strong>Projection</strong></li><li><strong>Selection</strong></li><li><strong>Join</strong></li></ol><h3>SELECT</h3><p>The <strong>SELECT</strong> statement is used to retrieve the data from a table and display it.</p><h3>Syntax</h3><p>SELECT column_name<br>FROM table_name;</p><h3>Example</h3><p>SELECT Name, Salary<br>FROM Employee;</p><h3>Projection</h3><p><strong>Projection</strong> is the process of retrieving the data by selecting only the required columns from a table.</p><h3>Syntax</h3><p>SELECT column1, column2, ...<br>FROM table_name;</p><h3>Example</h3><p>SELECT Name, Department<br>FROM Employee;</p><h3>Order of Execution (Backend)</h3><ol><li><strong>FROM</strong></li><li><strong>SELECT</strong></li></ol><h3>Star (*)</h3><p>The <strong>(*)</strong> symbol is used to select <strong>all the columns</strong> present in a table.</p><h3>Syntax</h3><p>SELECT *<br>FROM table_name;</p><h3>Example</h3><p>SELECT *<br>FROM Employee;</p><blockquote><strong><em>Note:</em></strong><em> Along with </em><strong><em>(*)</em></strong><em>, we are </em><strong><em>not supposed to use any other column name</em></strong><em>.</em></blockquote><blockquote><strong><em>Incorrect</em></strong></blockquote><p>SELECT *, Name<br>FROM Employee;</p><p><strong>Correct</strong></p><p>SELECT *<br>FROM Employee;</p><p>or</p><p>SELECT Name, Salary<br>FROM Employee;</p><h3>DISTINCT</h3><p>The <strong>DISTINCT</strong> clause is used to remove duplicate or repeated values from the result table.</p><h3>Syntax</h3><p>SELECT DISTINCT column_name<br>FROM table_name;</p><h3>Example</h3><p>SELECT DISTINCT Department<br>FROM Employee;</p><blockquote><strong><em>Note 1:</em></strong><em> The </em><strong><em>DISTINCT</em></strong><em> clause must be used as the </em><strong><em>first argument</em></strong><em> of the </em><strong><em>SELECT</em></strong><em> statement.</em></blockquote><blockquote><strong><em>Note 2:</em></strong><em> We can use </em><strong><em>multiple columns</em></strong><em> with the </em><strong><em>DISTINCT</em></strong><em> clause. It removes duplicate </em><strong><em>combinations</em></strong><em> of the selected columns.</em></blockquote><h3>Example</h3><p>SELECT DISTINCT Department, City<br>FROM Employee;</p><h3>Expression</h3><p>Any statement that gives us some result is known as an <strong>Expression</strong>.</p><h3>Example</h3><p>SELECT Salary + 5000<br>FROM Employee;</p><h3>Alias</h3><p>An <strong>Alias</strong> is used to give an alternative name to a <strong>column</strong> or an <strong>expression</strong>.</p><p>We can give an alias in two ways:</p><ol><li>Using the <strong>AS</strong> keyword.</li><li>Without using the <strong>AS</strong> keyword (by giving a space).</li></ol><h3>Syntax</h3><p>SELECT column_name AS alias_name<br>FROM table_name;</p><p>or</p><p>SELECT column_name alias_name<br>FROM table_name;</p><h3>Example</h3><p>SELECT Salary AS Employee_Salary<br>FROM Employee;</p><p>or</p><p>SELECT Salary Employee_Salary<br>FROM Employee;</p><h3>Selection</h3><p><strong>Selection</strong> is the process of retrieving the data by selecting both <strong>rows</strong> and <strong>columns</strong>.</p><h3>Syntax</h3><p>SELECT column_name<br>FROM table_name<br>WHERE condition;</p><h3>Example</h3><p>SELECT Name, Salary<br>FROM Employee<br>WHERE Salary &gt; 30000;</p><h3>Order of Execution (Backend)</h3><ol><li><strong>FROM</strong></li><li><strong>WHERE</strong></li><li><strong>SELECT</strong></li></ol><h3>WHERE Clause</h3><p>The <strong>WHERE</strong> clause is used to filter records.</p><p>It is executed <strong>row by row</strong>.</p><p>We can pass conditions in the <strong>WHERE</strong> clause to retrieve only the required records.</p><h3>Syntax</h3><p>SELECT column_name<br>FROM table_name<br>WHERE condition;</p><h3>Example</h3><p>SELECT *<br>FROM Employee<br>WHERE Department = &#39;HR&#39;;</p><h3>Operators Used in WHERE Clause</h3><p>The following operators can be used in the <strong>WHERE</strong> clause:</p><ol><li><strong>Arithmetic Operators</strong></li></ol><ul><li>+</li><li>-</li><li>*</li><li>/</li></ul><p><strong>2. Comparison Operators</strong></p><ul><li>=</li><li>!=</li><li>&lt;&gt;</li><li>&gt;</li><li>&lt;</li><li>&gt;=</li><li>&lt;=</li></ul><p><strong>3. Relational Operators</strong></p><p><strong>4. Concatenation Operator</strong></p><ul><li>||</li></ul><p><strong>5. Logical Operators</strong></p><ul><li>AND</li><li>OR</li><li>NOT</li></ul><p><strong>6. Special Operators</strong></p><ul><li><strong>IN</strong></li><li><strong>BETWEEN</strong></li><li><strong>IS NULL</strong></li><li><strong>LIKE</strong></li></ul><p><strong>7. Subquery Operators</strong></p><ul><li><strong>ALL</strong></li><li><strong>ANY</strong></li><li><strong>EXISTS</strong></li><li><strong>NOT EXISTS</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94906a4ab69c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Statements with Syntax]]></title>
            <link>https://medium.com/@rishilaman/sql-statements-with-syntax-5d83ed2f3ca8?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d83ed2f3ca8</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 08:10:21 GMT</pubDate>
            <atom:updated>2026-08-05T08:10:21.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>CREATE TABLE</h3><p>The <strong>CREATE</strong> statement is used to create a new table in the database. It comes under <strong>DDL (Data Definition Language)</strong>.</p><h3>Syntax</h3><p>CREATE TABLE table_name (<br> column1 data_type,<br> column2 data_type,<br> column3 data_type<br>);</p><h3>DESC (Describe Table)</h3><p>The <strong>DESC</strong> statement is used to view the structure of a table.</p><h3>Syntax</h3><p>DESC table_name;</p><h3>INSERT</h3><p>The <strong>INSERT</strong> statement is used to insert data into a table. It comes under <strong>DML (Data Manipulation Language).</strong></p><h3>Syntax</h3><p>INSERT INTO table_name<br>VALUES (value1, value2, value3);</p><h3>UPDATE</h3><p>The <strong>UPDATE</strong> statement is used to update existing data in a table.</p><h3>Syntax</h3><p>UPDATE table_name<br>SET column_name = value<br>WHERE condition;</p><h3>Example</h3><p>UPDATE EMP<br>SET Salary = 3000<br>WHERE ID = 1;</p><p>This statement updates the salary of the employee whose <strong>ID = 1</strong>.</p><h3>DELETE</h3><p>The <strong>DELETE</strong> statement is used to delete records from a table.</p><h3>Syntax</h3><p>DELETE FROM table_name<br>WHERE condition;</p><h3>Example</h3><p>DELETE FROM EMPLOYEE<br>WHERE ID = 4;</p><p>This statement deletes the record of the employee whose <strong>ID = 4</strong>.</p><h3>ALTER</h3><p>The <strong>ALTER</strong> statement is used to modify the structure of an existing table.</p><h4>Syntax</h4><p>ALTER TABLE table_name<br>ADD column_name data_type;</p><h3>DROP</h3><p>The <strong>DROP</strong> statement is used to delete the entire table permanently.</p><h3>Syntax</h3><p>DROP TABLE table_name;</p><h3>TRUNCATE</h3><p>The <strong>TRUNCATE</strong> statement is used to delete all the records from a table without deleting its structure.</p><h3>Syntax</h3><p>TRUNCATE TABLE table_name;</p><h3>GRANT</h3><p>The <strong>GRANT</strong> statement is used to give permissions to a user.</p><h3>Syntax</h3><p>GRANT privilege<br>ON table_name<br>TO user_name;</p><h3>REVOKE</h3><p>The <strong>REVOKE</strong> statement is used to remove permissions from a user.</p><h3>Syntax</h3><p>REVOKE privilege<br>ON table_name<br>FROM user_name;</p><h3>COMMIT</h3><p>The <strong>COMMIT</strong> statement is used to save the transaction permanently.</p><h3>Syntax</h3><p>COMMIT;</p><h3>ROLLBACK</h3><p>The <strong>ROLLBACK</strong> statement is used to undo the changes made in the current transaction.</p><h3>Syntax</h3><p>ROLLBACK;</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d83ed2f3ca8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overview of SQL Statements]]></title>
            <link>https://medium.com/@rishilaman/overview-of-sql-statements-b7e7b1a243ef?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e7b1a243ef</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 16:26:58 GMT</pubDate>
            <atom:updated>2026-08-04T16:26:58.652Z</atom:updated>
            <content:encoded><![CDATA[<p>There are <strong>five types of SQL statements</strong>:</p><ol><li><strong>DDL (Data Definition Language)</strong></li><li><strong>DML (Data Manipulation Language)</strong></li><li><strong>TCL (Transaction Control Language)</strong></li><li><strong>DCL (Data Control Language)</strong></li><li><strong>DQL (Data Query Language)</strong></li></ol><h3>DDL (Data Definition Language)</h3><p><strong>DDL (Data Definition Language)</strong> is used to define and modify the structure of database objects.</p><p>The DDL statements are:</p><ul><li><strong>CREATE</strong></li><li><strong>ALTER</strong></li><li><strong>DROP</strong></li><li><strong>TRUNCATE</strong></li></ul><blockquote><strong><em>Note:</em></strong><em> DDL statements do not require </em><strong><em>COMMIT</em></strong><em> because they are </em><strong><em>auto-committed</em></strong><em>.</em></blockquote><h3>DML (Data Manipulation Language)</h3><p><strong>DML (Data Manipulation Language)</strong> is used to manipulate the data stored in a table.</p><p>The DML statements are:</p><ul><li><strong>INSERT</strong></li><li><strong>UPDATE</strong></li><li><strong>DELETE</strong></li></ul><blockquote><strong><em>Note:</em></strong><em> DML statements are </em><strong><em>not saved automatically</em></strong><em>. You need to use </em><strong><em>COMMIT</em></strong><em> to save the transaction or </em><strong><em>ROLLBACK</em></strong><em> to revert the transaction.</em></blockquote><h3><strong><em>TCL (Transaction Control Language)</em></strong></h3><p><strong>TCL (Transaction Control Language)</strong> is used to manage transactions.</p><p>The TCL statements are:</p><ul><li><strong>COMMIT</strong></li><li><strong>ROLLBACK</strong></li></ul><h3>DCL (Data Control Language)</h3><p><strong>DCL (Data Control Language)</strong> is used to control user permissions.</p><p>The DCL statements are:</p><ul><li><strong>GRANT</strong> — Used to give permission to a user.</li><li><strong>REVOKE</strong> — Used to remove permission from a user.</li></ul><h3>DQL (Data Query Language)</h3><p><strong>DQL (Data Query Language)</strong> is used to retrieve data from a database.</p><p>The DQL statements are:</p><ul><li><strong>SELECT</strong></li><li><strong>PROJECTION</strong></li><li><strong>SELECTION</strong></li><li><strong>JOIN</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e7b1a243ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Constraints In SQL]]></title>
            <link>https://medium.com/@rishilaman/constraints-in-sql-f5af1bb344c8?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5af1bb344c8</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 15:03:23 GMT</pubDate>
            <atom:updated>2026-08-03T15:03:23.915Z</atom:updated>
            <content:encoded><![CDATA[<p>In order to create a <strong>table</strong>, two things are required:</p><ol><li><strong>Data Types</strong></li><li><strong>Constraints</strong></li></ol><p><strong>Data Types</strong> are <strong>mandatory</strong>, whereas <strong>Constraints</strong> are <strong>optional</strong>.</p><p>A <strong>Constraint</strong> is a rule given to a <strong>column</strong> for data validation. It helps ensure that only valid data is stored in the table.</p><h3>Types of Constraints</h3><ol><li><strong>UNIQUE</strong></li><li><strong>NOT NULL</strong></li><li><strong>CHECK</strong></li><li><strong>PRIMARY KEY</strong></li><li><strong>FOREIGN KEY</strong></li></ol><h3>UNIQUE Constraint</h3><p>The <strong>UNIQUE</strong> constraint is used to avoid duplicate values in a column. It ensures that all values in the column are unique.</p><h3>Syntax</h3><pre>CREATE TABLE table_name (<br>    column_name data_type UNIQUE<br>);</pre><h3>NOT NULL Constraint</h3><p>The <strong>NOT NULL</strong> constraint is used to avoid <strong>NULL</strong> values in a column. It ensures that every record must contain a value for that column.</p><h3>Syntax</h3><pre>CREATE TABLE table_name (<br>    column_name data_type NOT NULL<br>);</pre><h3>CHECK Constraint</h3><p>The <strong>CHECK</strong> constraint is used to apply an extra validation with a condition. If the condition is satisfied, the value is accepted; otherwise, it is rejected.</p><h3>Syntax</h3><pre>CREATE TABLE table_name (<br>    column_name data_type CHECK (condition)<br>);</pre><h3>PRIMARY KEY Constraint</h3><p>The <strong>PRIMARY KEY</strong> constraint is used to identify a record uniquely from a table.</p><h3>Characteristics of PRIMARY KEY</h3><ul><li>A <strong>PRIMARY KEY</strong> cannot accept duplicate values.</li><li>A <strong>PRIMARY KEY</strong> cannot accept <strong>NULL</strong> values.</li><li>A <strong>PRIMARY KEY</strong> is the combination of <strong>UNIQUE</strong> and <strong>NOT NULL</strong> constraints.</li><li>We can have only <strong>one PRIMARY KEY</strong> in a table.</li></ul><h3>FOREIGN KEY Constraint</h3><p>The <strong>FOREIGN KEY</strong> constraint is used to establish a connection between two or more tables.</p><h3>Characteristics of FOREIGN KEY</h3><ul><li>A <strong>FOREIGN KEY</strong> can accept duplicate values.</li><li>A <strong>FOREIGN KEY</strong> can accept <strong>NULL</strong> values.</li><li>A <strong>FOREIGN KEY</strong> is <strong>not</strong> the combination of <strong>UNIQUE</strong> and <strong>NOT NULL</strong> constraints.</li><li>We can have <strong>more than one FOREIGN KEY</strong> in a table.</li></ul><blockquote><strong><em>Note 1:</em></strong><em> For an attribute to become a </em><strong><em>FOREIGN KEY</em></strong><em>, it is mandatory that it must be the </em><strong><em>PRIMARY KEY</em></strong><em> of another table.</em></blockquote><blockquote><strong><em>Note 2:</em></strong><em> In order to establish a relationship between tables, we require two steps:</em></blockquote><ul><li>Add a column.</li><li>Assign a <strong>FOREIGN KEY</strong> to that column</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5af1bb344c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Part 1]]></title>
            <link>https://medium.com/@rishilaman/sql-part-1-40910018c4e0?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/40910018c4e0</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 02:38:04 GMT</pubDate>
            <atom:updated>2026-08-03T02:38:04.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL (Structured Query Language)</h3><p><strong>SQL (Structured Query Language)</strong> is a language used to communicate with the database.</p><h3>Data</h3><p><strong>Data</strong> is the raw fact that is used to describe the attributes of an entity.</p><h3>Database</h3><p>A <strong>database</strong> is a place, medium, or container that is used to store data in a systematic and organized manner.</p><p>We can place the data randomly in a database, but it will be difficult to fetch and manage it efficiently.</p><p>The basic operations that we can perform on a database are known as <strong>CRUD operations</strong>:</p><ul><li><strong>Create</strong> — Used to insert new data.</li><li><strong>Read</strong> — Used to retrieve existing data.</li><li><strong>Update</strong> — Used to modify existing data.</li><li><strong>Delete</strong> — Used to remove existing data.</li></ul><h3>DBMS (Database Management System)</h3><p><strong>DBMS (Database Management System)</strong> is software that is used to maintain and manage our database.</p><h3>Features of DBMS</h3><p><strong>Security</strong> and <strong>Authorization</strong> are two important features provided by a DBMS.</p><ul><li><strong>Security:</strong> We can understand this with the example of a <strong>User ID</strong> and <strong>Password</strong>, which help protect the database from unauthorized access.</li><li><strong>Authorization:</strong> We can understand this with the example of an <strong>OTP (One-Time Password)</strong>, which verifies whether a user is allowed to access the database.</li></ul><p>We use <strong>SQL (Structured Query Language)</strong> to communicate with the DBMS.</p><p>A <strong>DBMS stores data in file form</strong>.</p><h3>RDBMS (Relational Database Management System)</h3><p><strong>RDBMS (Relational Database Management System)</strong> is a type of DBMS software that is used to maintain and manage our database.</p><h3>Features of RDBMS</h3><p><strong>Security</strong> and <strong>Authorization</strong> are two important features provided by an RDBMS.</p><p>We use <strong>SQL (Structured Query Language)</strong> to communicate or interact with an RDBMS.</p><p>An <strong>RDBMS stores data in table form</strong>.</p><p>In <strong>RDBMS</strong>, <strong>R</strong> stands for <strong>Relational Model</strong>.</p><p>The <strong>Relational Model</strong> was designed by <strong>E. F. Codd</strong>.</p><p>In the Relational Model, data is stored in the form of tables.</p><p>Any <strong>DBMS</strong> that follows the <strong>Relational Model</strong> becomes an <strong>RDBMS</strong>.</p><p>Any DBMS that follows the <strong>E. F. Codd Rules</strong> is also considered an <strong>RDBMS</strong>.</p><h3>Table</h3><p>A <strong>table</strong> is the logical organization of data that consists of <strong>rows</strong> and <strong>columns</strong>.</p><p>A <strong>cell</strong> is the intersection of a <strong>row</strong> and a <strong>column</strong>.</p><p>A <strong>column</strong> is also known as an <strong>Attribute</strong> or <strong>Field</strong>.</p><p>A <strong>row</strong> is also known as a <strong>Record</strong> or <strong>Tuple</strong>.</p><h3>E. F. Codd Rules</h3><h3>Rule 1</h3><p>The data entered into a <strong>cell</strong> must always be a <strong>single value (atomic value)</strong>.</p><h3>Rule 2</h3><p>According to <strong>E. F. Codd</strong>, we can store data in <strong>multiple tables</strong>. If needed, we can establish a connection between the tables with the help of a <strong>key attribute</strong>.</p><h3>Rule 3</h3><p>In an <strong>RDBMS</strong>, we can store everything in the form of <strong>tables</strong>, including <strong>metadata</strong>.</p><p><strong>Metadata</strong> refers to the further details of data. It is also known as <strong>data about data</strong> and is generally <strong>auto-generated</strong> by the database system.</p><h3>Rule 4</h3><p>The data entered into a table can be <strong>validated</strong> in two ways:</p><ol><li>By assigning <strong>Data Types</strong>.</li><li>By assigning <strong>Constraints</strong>.</li></ol><blockquote><strong><em>Note:</em></strong><em> Data Types are </em><strong><em>mandatory</em></strong><em>, whereas Constraints are </em><strong><em>optional</em></strong><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40910018c4e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Public Class Naming, Autoboxing & POJO in Java]]></title>
            <link>https://medium.com/@rishilaman/public-class-naming-autoboxing-pojo-in-java-0460be69b3c9?source=rss-f5fa0fd48225------2</link>
            <guid isPermaLink="false">https://medium.com/p/0460be69b3c9</guid>
            <category><![CDATA[java-full-stack-developer]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-programming]]></category>
            <dc:creator><![CDATA[Rishil Aman ]]></dc:creator>
            <pubDate>Mon, 04 May 2026 13:34:19 GMT</pubDate>
            <atom:updated>2026-05-04T13:34:19.520Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Public Class Name = File Name?</h3><p>In Java, if a class is declared as <strong>public</strong>, then:</p><p>The <strong>file name must match the class name</strong></p><h3>Why?</h3><ul><li>JVM needs to know <strong>which class to load</strong></li><li>It looks for the public class directly</li></ul><p>If names don’t match → confusion (ambiguity)</p><h3>Important Rule:</h3><ul><li>Only <strong>one public class per file</strong></li><li>File name = Public class name</li></ul><p>If we had two public classes:</p><ul><li>Java wouldn’t know which name to use<br> This creates <strong>ambiguity</strong></li></ul><h3>Autoboxing &amp; Unboxing</h3><p>Java provides <strong>wrapper classes</strong> to convert primitive types into objects.</p><h3>Primitive → Wrapper</h3><ul><li>int → Integer</li><li>float → Float</li><li>double → Double</li><li>long → Long</li></ul><h3>Why Wrapper Classes?</h3><p>Because many features in Java work only with <strong>objects</strong>, not primitives.</p><p>Example:</p><ul><li>Collection Framework (ArrayList, LinkedList)</li></ul><h3>Autoboxing</h3><p>Automatic conversion:</p><p>Primitive → Object</p><h3>Unboxing</h3><p>Automatic conversion:</p><p>Object → Primitive</p><h3>Important Concept</h3><p>== compares <strong>references</strong>, not values</p><h3>Abstract Class</h3><p>A class that <strong>cannot be instantiated</strong></p><ul><li>Used for abstraction</li><li>Can have abstract + non-abstract methods</li></ul><h3>POJO (Plain Old Java Object)</h3><p>POJO is a <strong>simple Java class</strong>:</p><p>No external framework<br> Used to model real-world objects</p><h3>Features:</h3><ul><li>Variables (fields)</li><li>Getter &amp; Setter</li><li>Constructors</li><li>No complex logic</li></ul><h3>When to Use?</h3><ul><li>When modeling simple data</li><li>When no heavy business logic is required</li></ul><h3>Types of POJO Models</h3><h3>1. Anemic Model</h3><ul><li>Only data (fields, getters, setters)</li><li>No business logic</li></ul><h3>2. Rich Domain Model</h3><ul><li>Contains data + business logic</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0460be69b3c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>