<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tharunya K R</title>
    <description>The latest articles on DEV Community by Tharunya K R (@tharunya_kr_c17e81c2a49a).</description>
    <link>https://dev.to/tharunya_kr_c17e81c2a49a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3837968%2Fe8133015-bd47-459b-8647-3884c9c1d0bd.png</url>
      <title>DEV Community: Tharunya K R</title>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tharunya_kr_c17e81c2a49a"/>
    <language>en</language>
    <item>
      <title>How a request originates from client and reaches the server</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 18:36:55 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/how-a-request-originates-from-client-and-reaches-the-server-3aio</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/how-a-request-originates-from-client-and-reaches-the-server-3aio</guid>
      <description>&lt;p&gt;1.You type a website&lt;/p&gt;

&lt;p&gt;Example: google.com&lt;/p&gt;

&lt;p&gt;2.Browser finds IP&lt;/p&gt;

&lt;p&gt;It asks DNS:&lt;br&gt;
“Where is this website?”&lt;/p&gt;

&lt;p&gt;Gets IP address&lt;/p&gt;

&lt;p&gt;3.Request is sent&lt;/p&gt;

&lt;p&gt;Your browser sends request to server&lt;br&gt;
 Like: “Give me the webpage”&lt;/p&gt;

&lt;p&gt;4.Server receives request&lt;/p&gt;

&lt;p&gt;Server understands what you want&lt;/p&gt;

&lt;p&gt;5.Server processes&lt;/p&gt;

&lt;p&gt;Fetch data from database&lt;br&gt;
Perform calculations&lt;br&gt;
Check authentication&lt;/p&gt;

&lt;p&gt;6.Server sends response&lt;/p&gt;

&lt;p&gt;Along with HTML , CSS ,JavaScript&lt;/p&gt;

&lt;p&gt;7.Browser shows output&lt;/p&gt;

&lt;p&gt;You see the webpage on screen&lt;/p&gt;

</description>
    </item>
    <item>
      <title>IP address and Subnet</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 18:22:50 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/ip-address-and-subnet-27gp</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/ip-address-and-subnet-27gp</guid>
      <description>&lt;p&gt;&lt;strong&gt;IP Address&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is a unique number given to each device connected to a network&lt;br&gt;
&lt;strong&gt;Example :&lt;/strong&gt;192.168.1.1&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two Types Of IP Address&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IPV4&lt;/li&gt;
&lt;li&gt;IPV6&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;IPV4&lt;/strong&gt;&lt;br&gt;
It is commonly used&lt;br&gt;
32-bit address&lt;br&gt;
Example: 192.168.1.1&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IPV6&lt;/strong&gt;&lt;br&gt;
New version&lt;br&gt;
128-bit address&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is a smaller division of a large network&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;192.168.1.0&lt;br&gt;
We can divide into smaller subnets like:&lt;br&gt;
192.168.1.1 → 192.168.1.254&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Durability</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 17:56:30 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/durability-24ia</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/durability-24ia</guid>
      <description>&lt;p&gt;&lt;strong&gt;Durability&lt;/strong&gt; means once transaction is commit the data is permanently saved &lt;br&gt;
&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
Transfer 100 from A to B&lt;br&gt;
A=1000&lt;br&gt;
B=500&lt;br&gt;
1.after transaction A=900&lt;br&gt;
B=600&lt;/p&gt;

&lt;p&gt;2.System Crashes Happen &lt;/p&gt;

&lt;p&gt;3.After Restart&lt;br&gt;
A=900&lt;br&gt;
B=600&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Isolation</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 17:41:16 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/isolation-1jl6</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/isolation-1jl6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Isolation&lt;/strong&gt; means when multiple transaction run at the same time they should not affect each other &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
Initial Data &lt;br&gt;
A=1000&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without Isolation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
T1 = Deduct 800&lt;br&gt;&lt;br&gt;
T2 = Deduct 500&lt;br&gt;&lt;br&gt;
1000-800-500 = -300&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Isolation&lt;/strong&gt;&lt;br&gt;
T1 = Deduct 800&lt;br&gt;
remaining 200&lt;br&gt;
T2 = deduct 500&lt;br&gt;
200 - 500 (Not allowed)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Consistency</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 17:11:46 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/consistency-54nb</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/consistency-54nb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Consistency&lt;/strong&gt; means after transaction database must give the correct and valid answer &lt;br&gt;
&lt;strong&gt;Example :&lt;/strong&gt; &lt;br&gt;
if A = Rs 100 , B = Rs 200 &lt;br&gt;
Total = Rs 300 &lt;br&gt;
After transfer Total = Rs 300&lt;br&gt;
if it is the correct value then it is inconsistency &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create table example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Table Used&lt;br&gt;
CREATE TABLE accounts (&lt;br&gt;
    id SERIAL PRIMARY KEY,&lt;br&gt;
    name TEXT NOT NULL,&lt;br&gt;
    balance INT NOT NULL CHECK (balance &amp;gt;= 0)&lt;br&gt;
);&lt;br&gt;
balance &amp;gt;= 0&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;INSERT INTO accounts (name, balance)&lt;br&gt;
VALUES&lt;br&gt;
('Alice', 1000),&lt;br&gt;
('Bob', 500);&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Valid Transaction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UPDATE accounts SET balance = balance - 100 WHERE name = 'Alice';&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alice = 900&lt;br&gt;
 It is valid&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Invalid Transaction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UPDATE accounts SET balance = -500 WHERE name = 'Alice'; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eror Occur Because negative value is occuring&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Atomicity</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 16:46:46 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/atomicity-25dj</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/atomicity-25dj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Atomicity&lt;/strong&gt; means it either happen completely or it does not happen anything &lt;br&gt;
If there is no error it give the correct result&lt;br&gt;
If there is an error it rollback(cancel) return to the initial state&lt;br&gt;
Testing error will happen to check the atomicity&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example :&lt;br&gt;
 Create an table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CREATE TABLE accounts (&lt;br&gt;
    id SERIAL PRIMARY KEY,&lt;br&gt;
    name TEXT NOT NULL,&lt;br&gt;
    balance INT NOT NULL CHECK (balance &amp;gt;= 0)&lt;br&gt;
);&lt;br&gt;
&lt;strong&gt;Sample Data&lt;/strong&gt;&lt;br&gt;
INSERT INTO accounts (name, balance)&lt;br&gt;
VALUES&lt;br&gt;
('Alice', 1000),&lt;br&gt;
('Bob', 500);&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Transaction :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;BEGIN; &lt;br&gt;
UPDATE accounts SET balance = balance - 100 WHERE name = 'Alice'; &lt;br&gt;
UPDATE accounts SET balance = balance + 100 WHERE name = 'Bob'; &lt;br&gt;
COMMIT;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result :&lt;/strong&gt;&lt;br&gt;
Alice : 900&lt;br&gt;
Bob : 600&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing Atomicity :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;BEGIN; UPDATE accounts SET balance = balance - 100 WHERE name = 'Alice'; &lt;br&gt;
UPDATE accounts SET balancee = balance + 100 WHERE name = 'Bob'; &lt;br&gt;
COMMIT;&lt;/p&gt;

&lt;p&gt;Here error happens ibstead of &lt;strong&gt;balance&lt;/strong&gt; it shows &lt;strong&gt;balancee&lt;/strong&gt;&lt;br&gt;
So Rollback happens it cancel every transaction and it return the initial state.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>postgres</category>
      <category>sql</category>
    </item>
    <item>
      <title>DB Problems</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Wed, 25 Mar 2026 14:28:45 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/db-problems-1h5o</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/db-problems-1h5o</guid>
      <description>&lt;p&gt;1.Find all movies where the special features are not listed (i.e., special_features is NULL).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE special features = NULL;&lt;br&gt;
Meaning : It returns the title of the movie where the special feature is null&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;2.Find all movies where the rental duration is more than 7 days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rental FROM film WHERE rental_duration &amp;gt; 7;&lt;br&gt;
Meaning : It returns the title of the movie and rental_duration more than 7 days&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3.Find all movies that have a rental rate of $4.99 and a replacement cost of more than $20&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rental_rate , replacement_cost FROM film WHERE rental_rate = 4.99 AND replacement_cost &amp;gt; 20;&lt;br&gt;
Meaning : It returns the title of the movie , rental_rate is equal to 4.99 and replacement_cost more than 20&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;4.Find all movies that have a rental rate of $0.99 or a rating of 'PG-13'.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rental_rate , rating FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13';&lt;br&gt;
Meaning : It returns title , rental_rate with 0.99 and rating with PG-13&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;5.Retrieve the first 5 rows of movies sorted alphabetically by title.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film ORDER BY title ASC LIMIT 5;&lt;br&gt;
Meaning : It Return the first 5 rows from the title column&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;6.Skip the first 10 rows and fetch the next 3 movies with the highest replacement cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , replacement_cost FROM film ORDER BY replacement_cost DESC OFFSET 10 LIMIT 3;&lt;br&gt;
Meaning : It returns the title , replacement_cost with highest 3 and skip the first 10 rows&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;7.Find all movies where the rating is either 'G', 'PG', or 'PG-13'.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rating FROM film WHERE rating = 'G' OR 'PG' OR 'PG-13';&lt;br&gt;
Meaning : It returns all the title with ratings of G or PG or PG-13&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;8.Find all movies with a rental rate between $2 and $4.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rental_rate FROM film WHERE rental_rate &amp;gt; 2 AND rental_rate &amp;lt; 4;&lt;br&gt;
Meaning : It return the title with rental_rate between 2 and 4&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;9.Find all movies with titles that start with 'The'.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE 'The%';&lt;br&gt;
Meaning : It return all the title where title name start with "The"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;10.Find the first 10 movies with a rental rate of $2.99 or $4.99, a rating of 'R', and a title containing the word "Love".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title , rental_rate , rating FROM film WHERE rental_rate = 2.99 OR rental_rate = 4.99 AND renting = 'R' AND title LIKE '%Love%' LIMIT 10;&lt;br&gt;
Meaning : It return the title with LOVE word and rental rate with 2.99 or 4.99 and renting is equl to "R"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;11.Find all movies where the title contains the % symbol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%\%%' ESCAPE '\';&lt;br&gt;
Meaning: It returns all movie titles that contain the percent (%) symbol anywhere in the title&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;12.Find all movies where the title contains an underscore (_).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%_%' ESCAPE '\';&lt;br&gt;
Meaning: It returns all movie titles that contain an underscore (_) anywhere&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;13.Find all movies where the title starts with "A" or "B" and ends with "s".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE (title LIKE 'A%' OR title LIKE 'B%') AND title LIKE '%s';&lt;br&gt;
Meaning: It returns all movie titles starting with "A" or "B" and ending with "s"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;14.Find all movies where the title contains "Man", "Men", or "Woman".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%Man%' OR title LIKE '%Men%' OR title LIKE '%Woman%';&lt;br&gt;
Meaning: It returns all movie titles that contain the words "Man", "Men", or "Woman" anywhere in the title&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;15.Find all movies with titles that contain digits (e.g., "007", "2", "300").&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title ~ '[0-9]';&lt;br&gt;
Meaning: It returns all movie titles that contain any number (0–9) in the title&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;16.Find all movies with titles containing a backslash ()&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%\%' ESCAPE '\';&lt;br&gt;
Meaning: It returns all movie titles that contain a backslash () anywhere&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;17.Find all movies where the title does contain the words "Love" or "Hate".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%Love%' OR title LIKE '%Hate%';&lt;br&gt;
Meaning: It returns all movie titles that contain "Love" or "Hate" anywhere in the title.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;18.Find the first 5 movies with titles that end with "er", "or", or "ar".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title FROM film WHERE title LIKE '%er' OR title LIKE '%or' OR title LIKE '%ar' LIMIT 5;&lt;br&gt;
Meaning: It returns the first 5 movie titles that end with "er", "or", or "ar"&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>Database Problems</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Tue, 24 Mar 2026 17:15:11 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/database-problems-4gom</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/database-problems-4gom</guid>
      <description>&lt;p&gt;Query all columns for a city in CITY with the ID 1661.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT * FROM CITY WHERE ID=1661;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return all columns from CITY table where ID is equal to 1661&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT * FROM CITY WHERE CountryCode = 'USA' AND Population &amp;gt;100000 ;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return all columns from CITY table where CountryCode is USA and population is greater than 100000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query all attributes of every Japanese city in the City table. The COUNTRYCODE for Japan is JPN.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT * FROM CITY WHERE CountryCode='JPN';&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return all columns from CITY table where CountryCode is JPN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT COUNT(CITY) - COUNT(DISTINCT CITY) AS difference FROM STATION;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return the difference between total number of city entries and unique city entries from the STATION table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT NAME FROM CITY WHERE COUNTRYCODE = 'USA' AND POPULATION &amp;gt; 120000;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return only the NAME column of cities from CITY table where CountryCode is USA and population is greater than 120000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT NAME FROM CITY WHERE COUNTRYCODE = 'JPN';&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return only the NAME column of cities from CITY table where CountryCode is JPN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT CITY FROM STATION WHERE CITY NOT LIKE 'A%' AND CITY NOT LIKE 'E%' AND CITY NOT LIKE 'I%' AND CITY NOT LIKE 'O%' AND CITY NOT LIKE 'U%';&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return unique city names from STATION table where the city name not start with a vowel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query all columns (attributes) for every row in the CITY table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT * FROM CITY;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return all columns and all rows from the CITY table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Query a list of CITY and STATE from the STATION table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT CITY , STATE FROM STATION;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Meaning : Return only the CITY and STATE columns from the STATION table&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Database Task</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Tue, 24 Mar 2026 16:45:01 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/database-task-1921</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/database-task-1921</guid>
      <description>&lt;p&gt;Retrieve film titles and their rental rates. Use column aliases to rename title as "Movie Title" and rental_rate as "Rate".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title AS "Movie Title" , rental_rate AS "Rate" FROM film;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Changing the name of the column title as Movie Title and rental_rate as Rate From film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List customer names and their email addresses. Alias first_name and last_name as "First Name" and "Last Name".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name AS "First Name", last_name AS "Last Name" FROM customer;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;SELECT first_name , last_name , email FROM customer;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return only first name , last name and email from the customer table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get a list of films sorted by rental rate in descending order. If two films have the same rental rate, sort them alphabetically by title.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, rental_rate FROM film ORDER BY rental_rate DESC, title ASC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return title and rental_rate from film table and rental_rate by descending , title by sorted&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve actor names sorted by last name, then first name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name FROM actor ORDER BY last_name ASC, first_name ASC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return last_name and first_name from film table by ascending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List all unique replacement costs from the film table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT replacement_cost FROM film;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return all non-duplicate values from film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List all films' title and length in minutes. Alias length as "Duration &lt;br&gt;
(min)".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, length AS "Duration (min)" FROM film;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return title and change length name as Duration(min) from film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve customer first and last names along with their active status. Alias active as "Is Active".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name, active AS "Is Active"&lt;br&gt;
FROM customer;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return first_name , last_name and active status change as Active from customer table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve the list of film categories sorted alphabetically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT name AS "Category" FROM category ORDER BY name ASC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return name change as category and arrange in ascending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List films by length, sorted in descending order. Include only the title and length.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, length FROM film ORDER BY length DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return title and length from film table and sort length in descending order (longest films first)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve all actor names, sorted by their first name in descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name FROM actor ORDER BY first_name DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return first_name and last_name from actor table and sort by first_name in descending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List all unique ratings available in the film table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT rating FROM film;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return all unique (non-duplicate) ratings from film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Find all unique rental durations from the film table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT rental_duration FROM film;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return all unique rental_duration values from film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve the first unique customer ID based on active status. Include the customer_id and active columns, and order by customer_id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT customer_id, active FROM customer ORDER BY customer_id LIMIT 1;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return first customer_id and active status from customer table based on ascending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List the earliest rental date for each customer. Include customer_id and rental_date, and order by customer_id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT customer_id, MIN(rental_date) AS rental_date FROM rental GROUP BY customer_id ORDER BY customer_id;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Meaning : Return customer_id and earliest rental_date for each customer using MIN function&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
 List the 10 shortest films by length. Include the title and length.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, length FROM film ORDER BY length ASC LIMIT 10;&lt;br&gt;
**&lt;br&gt;
**Meaning : Return 10 films with shortest length from film table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the top 5 customers with the highest customer_id. Include the first and last name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name FROM customer ORDER BY customer_id DESC LIMIT 5;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return top 5 customers with highest customer_id sorted in descending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve all unique values of store_id from the inventory table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT store_id FROM inventory;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return all unique store_id values from inventory table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Find all unique replacement_cost values in the film table. Sort the results in ascending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT replacement_cost FROM film ORDER BY replacement_cost ASC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Meaning : Return unique replacement_cost values sorted in ascending order&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
 List the first rental date for each store. Include store_id and rental_date, and sort by store_id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT store_id, MIN(rental_date) AS rental_date FROM rental GROUP BY store_id ORDER BY store_id;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return earliest rental_date for each store using MIN function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve a list of film ratings sorted alphabetically and include only unique values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT DISTINCT rating FROM film ORDER BY rating ASC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return unique film ratings sorted alphabetically&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List films by rating in ascending order and length in descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, rating, length FROM film ORDER BY rating ASC, length DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Meaning : Return films sorted by rating (ascending) and length (descending)&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
 Retrieve actor names sorted by last_name in ascending order and first_name in descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name FROM actor ORDER BY last_name ASC, first_name DESC;&lt;br&gt;
**&lt;br&gt;
**Meaning : Return actor names sorted by last_name ascending and first_name descending&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List films ordered by replacement_cost in ascending order and rental_rate in descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, replacement_cost, rental_rate FROM film ORDER BY replacement_cost ASC, rental_rate DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return films sorted by replacement_cost ascending and rental_rate descending&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve customer names sorted by last_name ascending and first_name descending.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT first_name, last_name FROM customer ORDER BY last_name ASC, first_name DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return customer names sorted by last_name ascending and first_name descending&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List all rentals sorted by customer_id ascending and rental_date descending.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT customer_id, rental_date FROM rental ORDER BY customer_id ASC, rental_date DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return rentals sorted by customer_id ascending and rental_date descending&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve a list of films ordered by rental_duration ascending and title descending.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SELECT title, rental_duration FROM film ORDER BY rental_duration ASC, title DESC;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meaning : Return films sorted by rental_duration ascending and title descending&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Removing Duplicates from a Sorted Linked List</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Sun, 22 Mar 2026 14:33:25 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/removing-duplicates-from-a-sorted-linked-list-283l</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/removing-duplicates-from-a-sorted-linked-list-283l</guid>
      <description>&lt;p&gt;Problem&lt;/p&gt;

&lt;p&gt;Given a sorted singly linked list, remove duplicate nodes so that each element appears only once.&lt;/p&gt;

&lt;p&gt;Do not use extra space.&lt;br&gt;
The linked list is already sorted, so duplicates will be adjacent.&lt;br&gt;
Example 1&lt;br&gt;
Input:  2 -&amp;gt; 2 -&amp;gt; 4 -&amp;gt; 5&lt;br&gt;
Output: 2 -&amp;gt; 4 -&amp;gt; 5&lt;/p&gt;

&lt;p&gt;Explanation: The value 2 appears twice, so one duplicate is removed.&lt;/p&gt;

&lt;p&gt;Example 2&lt;br&gt;
Input:  2 -&amp;gt; 2 -&amp;gt; 2 -&amp;gt; 2 -&amp;gt; 2&lt;br&gt;
Output: 2&lt;/p&gt;

&lt;p&gt;Explanation: All nodes have value 2, so only one node remains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start from the head node.&lt;br&gt;
Traverse the linked list.&lt;br&gt;
If the current node value is equal to the next node value, skip the next node.&lt;br&gt;
Otherwise move to the next node.&lt;br&gt;
Continue until the end of the list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;def removeDuplicates(head):&lt;br&gt;
    curr = head&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while curr and curr.next:
    if curr.data == curr.next.data:
        curr.next = curr.next.next  # remove duplicate
    else:
        curr = curr.next           # move forward

return head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Output&lt;br&gt;
2 -&amp;gt; 4 -&amp;gt; 5&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>beginners</category>
      <category>computerscience</category>
      <category>python</category>
    </item>
    <item>
      <title>Finding the Largest Sum of a Subarray</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Sun, 22 Mar 2026 14:25:21 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/finding-the-largest-sum-of-a-subarray-20p3</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/finding-the-largest-sum-of-a-subarray-20p3</guid>
      <description>&lt;p&gt;Problem&lt;/p&gt;

&lt;p&gt;Given an integer array arr[], find the maximum sum of a subarray (containing at least one element).&lt;br&gt;
A subarray is a continuous part of the array.&lt;/p&gt;

&lt;p&gt;Example 1&lt;br&gt;
Input: arr = [2, 3, -8, 7, -1, 2, 3]&lt;br&gt;
Output: 11&lt;br&gt;
Explanation: Subarray [7, -1, 2, 3] gives the maximum sum 11.&lt;/p&gt;

&lt;p&gt;Example 2&lt;br&gt;
Input: arr = [-2, -4]&lt;br&gt;
Output: -2&lt;br&gt;
Explanation: Subarray [-2] has the maximum sum.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach (Kadane’s Algorithm)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start with the first element as the current and maximum sum.&lt;br&gt;
Traverse the array from the second element.&lt;br&gt;
At each step:&lt;br&gt;
Either start a new subarray from the current element.&lt;br&gt;
Or extend the existing subarray.&lt;br&gt;
Update the maximum sum if a larger sum is found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;class Solution:&lt;br&gt;
    def maxSubarraySum(self, arr):&lt;br&gt;
        max_sum = arr[0]&lt;br&gt;
        curr_sum = 0&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    for num in arr:
        curr_sum += num

        if curr_sum &amp;gt; max_sum:
            max_sum = curr_sum

        if curr_sum &amp;lt; 0:
            curr_sum = 0

    return max_sum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Output&lt;br&gt;
11&lt;br&gt;
-2&lt;br&gt;
25&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Maximum Subarray Sum</title>
      <dc:creator>Tharunya K R</dc:creator>
      <pubDate>Sun, 22 Mar 2026 14:21:29 +0000</pubDate>
      <link>https://dev.to/tharunya_kr_c17e81c2a49a/maximum-subarray-sum-56ol</link>
      <guid>https://dev.to/tharunya_kr_c17e81c2a49a/maximum-subarray-sum-56ol</guid>
      <description>&lt;p&gt;Problem&lt;/p&gt;

&lt;p&gt;Given an integer array arr[], find the maximum sum of a contiguous subarray.&lt;/p&gt;

&lt;p&gt;The subarray must contain at least one element.&lt;br&gt;
Example 1&lt;br&gt;
Input: arr = [2, 3, -8, 7, -1, 2, 3]&lt;br&gt;
Output: 11&lt;/p&gt;

&lt;p&gt;Explanation: Subarray [7, -1, 2, 3] has the largest sum = 11.&lt;/p&gt;

&lt;p&gt;Example 2&lt;br&gt;
Input: arr = [-2, -4]&lt;br&gt;
Output: -2&lt;/p&gt;

&lt;p&gt;Explanation: Subarray [-2] has the largest sum = -2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach – Kadane’s Algorithm&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Initialize:&lt;br&gt;
max_current = arr[0] → max sum ending at current position&lt;br&gt;
max_global = arr[0] → max sum found so far&lt;br&gt;
Traverse the array from index 1:&lt;br&gt;
max_current = max(arr[i], max_current + arr[i]) → either start new subarray or extend existing&lt;br&gt;
max_global = max(max_global, max_current) → update maximum found&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;class Solution:&lt;br&gt;
    def maxSubarraySum(self, arr):&lt;br&gt;
        max_sum = arr[0]&lt;br&gt;
        curr_sum = 0&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    for num in arr:
        curr_sum += num

        if curr_sum &amp;gt; max_sum:
            max_sum = curr_sum

        if curr_sum &amp;lt; 0:
            curr_sum = 0

    return max_sum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Output&lt;br&gt;
Maximum Subarray Sum: 11&lt;br&gt;
Maximum Subarray Sum: -2&lt;br&gt;
Maximum Subarray Sum: 25&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>interview</category>
      <category>python</category>
    </item>
  </channel>
</rss>
