<?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: Sami</title>
    <description>The latest articles on DEV Community by Sami (@sami21234).</description>
    <link>https://dev.to/sami21234</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3483986%2Fbc3a0cbe-52d2-468e-8364-ee7313e42972.jpeg</url>
      <title>DEV Community: Sami</title>
      <link>https://dev.to/sami21234</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sami21234"/>
    <language>en</language>
    <item>
      <title>Statistics</title>
      <dc:creator>Sami</dc:creator>
      <pubDate>Tue, 30 Jun 2026 10:43:20 +0000</pubDate>
      <link>https://dev.to/sami21234/statistics-2c0e</link>
      <guid>https://dev.to/sami21234/statistics-2c0e</guid>
      <description>&lt;h2&gt;
  
  
  Descriptive Statistics Explained
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;My notes while learning Statistics for Data Science&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I first started learning Data Science, I thought statistics was just another boring mathematics subject with formulas to memorize.&lt;/p&gt;

&lt;p&gt;I was completely wrong.&lt;/p&gt;

&lt;p&gt;The more I learned, the more I realized that statistics is actually the language of data. Before building Machine Learning models, creating dashboards, or making predictions, we first need to understand what our data is trying to tell us.&lt;/p&gt;

&lt;p&gt;This blog is my attempt to explain the concepts in a simple way—the way I understood them while learning.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Statistics?
&lt;/h2&gt;

&lt;p&gt;Imagine a company has data of 10 million customers.&lt;/p&gt;

&lt;p&gt;Can a human sit and read every row?&lt;/p&gt;

&lt;p&gt;Obviously not.&lt;/p&gt;

&lt;p&gt;Statistics helps us summarize huge amounts of data into meaningful information so we can make decisions.&lt;/p&gt;

&lt;p&gt;Instead of reading every single record, statistics answers questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the average customer age?&lt;/li&gt;
&lt;li&gt;Which product sells the most?&lt;/li&gt;
&lt;li&gt;How much variation exists in customer spending?&lt;/li&gt;
&lt;li&gt;Are sales increasing or decreasing?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple words,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Statistics is the science of collecting, organizing, analyzing, and understanding data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is exactly why statistics is used almost everywhere.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Netflix recommends movies using statistical patterns.&lt;/li&gt;
&lt;li&gt;Hospitals test whether a new medicine actually works.&lt;/li&gt;
&lt;li&gt;Companies forecast future sales.&lt;/li&gt;
&lt;li&gt;Governments conduct surveys before making policies.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Types of Statistics
&lt;/h2&gt;

&lt;p&gt;Statistics is mainly divided into two parts.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Descriptive Statistics
&lt;/h2&gt;

&lt;p&gt;This is where every Data Analyst starts.&lt;/p&gt;

&lt;p&gt;Descriptive Statistics focuses on understanding the data we already have.&lt;/p&gt;

&lt;p&gt;It answers questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the average salary?&lt;/li&gt;
&lt;li&gt;Which category appears most?&lt;/li&gt;
&lt;li&gt;How spread out are the values?&lt;/li&gt;
&lt;li&gt;What does the data look like?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt; predict the future.&lt;/p&gt;

&lt;p&gt;It simply describes the present.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Suppose we have students' marks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;78
82
91
67
75
88
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using descriptive statistics, we can calculate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Average marks&lt;/li&gt;
&lt;li&gt;Highest marks&lt;/li&gt;
&lt;li&gt;Lowest marks&lt;/li&gt;
&lt;li&gt;Most common marks&lt;/li&gt;
&lt;li&gt;Overall distribution&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Inferential Statistics
&lt;/h2&gt;

&lt;p&gt;This goes one step ahead.&lt;/p&gt;

&lt;p&gt;Instead of describing existing data, it tries to make conclusions about a larger population using only a sample.&lt;/p&gt;

&lt;p&gt;For example,&lt;/p&gt;

&lt;p&gt;Imagine India has more than a billion people.&lt;/p&gt;

&lt;p&gt;Surveying every person isn't possible.&lt;/p&gt;

&lt;p&gt;Instead, researchers survey a small group and use statistics to estimate what the entire population might think.&lt;/p&gt;

&lt;p&gt;Machine Learning heavily depends on Inferential Statistics because models learn patterns from sample data and apply them to unseen data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Population vs Sample
&lt;/h2&gt;

&lt;p&gt;This was one of the easiest concepts once I stopped overthinking it.&lt;/p&gt;

&lt;p&gt;Suppose a college has 12,000 students.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Population&lt;/strong&gt; is all 12,000 students.&lt;/p&gt;

&lt;p&gt;Now imagine we randomly choose 500 students for a survey.&lt;/p&gt;

&lt;p&gt;Those 500 students are called the &lt;strong&gt;Sample&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Population
↓

12000 Students

↓

Take 500 Random Students

↓

Sample
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since collecting data from everyone is expensive and time-consuming, most companies work with samples.&lt;/p&gt;

&lt;p&gt;The important part is choosing the sample correctly.&lt;/p&gt;

&lt;p&gt;A good sample should be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large enough&lt;/li&gt;
&lt;li&gt;Random&lt;/li&gt;
&lt;li&gt;Representative of the entire population&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Otherwise, the conclusions may be misleading.&lt;/p&gt;




&lt;h2&gt;
  
  
  Parameter vs Statistic
&lt;/h2&gt;

&lt;p&gt;This confused me initially because the words sound almost the same.&lt;/p&gt;

&lt;p&gt;Here's how I remember it.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Parameter&lt;/strong&gt; describes the entire population.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Statistic&lt;/strong&gt; describes only the sample.&lt;/p&gt;

&lt;p&gt;For example,&lt;/p&gt;

&lt;p&gt;Average salary of every employee in a company&lt;/p&gt;

&lt;p&gt;→ Parameter&lt;/p&gt;

&lt;p&gt;Average salary of 300 surveyed employees&lt;/p&gt;

&lt;p&gt;→ Statistic&lt;/p&gt;

&lt;p&gt;Simple.&lt;/p&gt;




&lt;h2&gt;
  
  
  Types of Data
&lt;/h2&gt;

&lt;p&gt;Before doing any analysis, we should understand what kind of data we're working with.&lt;/p&gt;

&lt;p&gt;Some data represents categories.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gender&lt;/li&gt;
&lt;li&gt;Department&lt;/li&gt;
&lt;li&gt;City&lt;/li&gt;
&lt;li&gt;Blood Group&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some data represents numbers.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Salary&lt;/li&gt;
&lt;li&gt;Height&lt;/li&gt;
&lt;li&gt;Weight&lt;/li&gt;
&lt;li&gt;Age&lt;/li&gt;
&lt;li&gt;Marks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowing the data type helps us choose the right visualization and statistical method.&lt;/p&gt;




&lt;h2&gt;
  
  
  Measure of Central Tendency
&lt;/h2&gt;

&lt;p&gt;Suppose your friend asks,&lt;/p&gt;

&lt;p&gt;"Can you summarize this dataset in one number?"&lt;/p&gt;

&lt;p&gt;That's exactly what central tendency does.&lt;/p&gt;

&lt;p&gt;It finds the center of the data.&lt;/p&gt;

&lt;p&gt;There are different ways to define this center.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mean (Average)
&lt;/h2&gt;

&lt;p&gt;The most commonly used measure.&lt;/p&gt;

&lt;p&gt;Formula:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mean = Sum of all values / Number of values
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Marks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;80 90 70 60 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(80+90+70+60+100)/5

=80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Easy.&lt;/p&gt;

&lt;p&gt;But there's a problem.&lt;/p&gt;

&lt;p&gt;Mean is affected by extreme values.&lt;/p&gt;

&lt;p&gt;Suppose one billionaire enters a room of middle-class people.&lt;/p&gt;

&lt;p&gt;Suddenly the average wealth becomes enormous.&lt;/p&gt;

&lt;p&gt;That doesn't represent reality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Median
&lt;/h2&gt;

&lt;p&gt;Median is the middle value after arranging the data.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 20 25 30 90
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Median = 25&lt;/p&gt;

&lt;p&gt;Unlike the mean, median ignores extremely high or low values.&lt;/p&gt;

&lt;p&gt;That's why salaries, house prices, and income distributions often use the median instead of the average.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mode
&lt;/h2&gt;

&lt;p&gt;Mode is simply the value that appears most frequently.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 3 5 3 6 7 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mode = 3&lt;/p&gt;

&lt;p&gt;This is useful when analyzing customer preferences.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Most purchased mobile brand.&lt;/p&gt;

&lt;p&gt;Most common payment method.&lt;/p&gt;

&lt;p&gt;Most selected course.&lt;/p&gt;




&lt;h2&gt;
  
  
  Weighted Mean
&lt;/h2&gt;

&lt;p&gt;Sometimes every value shouldn't have equal importance.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Your semester marks.&lt;/p&gt;

&lt;p&gt;Maybe:&lt;/p&gt;

&lt;p&gt;Assignments = 20%&lt;/p&gt;

&lt;p&gt;Mid Exam = 30%&lt;/p&gt;

&lt;p&gt;Final Exam = 50%&lt;/p&gt;

&lt;p&gt;Here we cannot simply calculate the average.&lt;/p&gt;

&lt;p&gt;Each score has a different weight.&lt;/p&gt;

&lt;p&gt;That's where Weighted Mean becomes useful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Trimmed Mean
&lt;/h2&gt;

&lt;p&gt;Imagine a company accidentally records these salaries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;25000
27000
26000
28000
30000
5000000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last value is an extreme outlier.&lt;/p&gt;

&lt;p&gt;Instead of letting one unusual value distort the average, we remove a small percentage of the highest and lowest values before calculating the mean.&lt;/p&gt;

&lt;p&gt;This gives a more reliable average.&lt;/p&gt;




&lt;h2&gt;
  
  
  Measure of Dispersion
&lt;/h2&gt;

&lt;p&gt;Knowing only the average isn't enough.&lt;/p&gt;

&lt;p&gt;Consider these two classes.&lt;/p&gt;

&lt;p&gt;Class A&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;50
50
50
50
50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Class B&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20
40
50
60
80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both have the same average.&lt;/p&gt;

&lt;p&gt;But clearly, Class B is much more spread out.&lt;/p&gt;

&lt;p&gt;Dispersion tells us how scattered the data is.&lt;/p&gt;




&lt;h2&gt;
  
  
  Range
&lt;/h2&gt;

&lt;p&gt;The simplest measure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Range = Maximum - Minimum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 20 30 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Range = 50 − 10 = 40&lt;/p&gt;

&lt;p&gt;Easy to calculate.&lt;/p&gt;

&lt;p&gt;But it depends only on two values, so it's very sensitive to outliers.&lt;/p&gt;




&lt;h2&gt;
  
  
  Variance
&lt;/h2&gt;

&lt;p&gt;Variance measures how far the values are from the average.&lt;/p&gt;

&lt;p&gt;Instead of looking only at the highest and lowest values, it considers every observation.&lt;/p&gt;

&lt;p&gt;Higher variance means the data is more spread out.&lt;/p&gt;

&lt;p&gt;Lower variance means the values stay close to the average.&lt;/p&gt;




&lt;h2&gt;
  
  
  Standard Deviation
&lt;/h2&gt;

&lt;p&gt;Standard deviation is simply the square root of variance.&lt;/p&gt;

&lt;p&gt;It is probably the most important measure of spread in statistics.&lt;/p&gt;

&lt;p&gt;A low standard deviation means the data points are tightly packed.&lt;/p&gt;

&lt;p&gt;A high standard deviation means the data is widely scattered.&lt;/p&gt;

&lt;p&gt;In Data Science, you'll see Standard Deviation almost everywhere—from feature engineering to anomaly detection and probability distributions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Coefficient of Variation (CV)
&lt;/h2&gt;

&lt;p&gt;Imagine two datasets.&lt;/p&gt;

&lt;p&gt;Dataset A&lt;/p&gt;

&lt;p&gt;Average = 20&lt;/p&gt;

&lt;p&gt;Standard Deviation = 5&lt;/p&gt;

&lt;p&gt;Dataset B&lt;/p&gt;

&lt;p&gt;Average = 500&lt;/p&gt;

&lt;p&gt;Standard Deviation = 20&lt;/p&gt;

&lt;p&gt;Looking only at standard deviation isn't fair because the averages are completely different.&lt;/p&gt;

&lt;p&gt;Coefficient of Variation solves this by comparing variability relative to the mean.&lt;/p&gt;

&lt;p&gt;This makes it easier to compare datasets with different scales.&lt;/p&gt;




&lt;h2&gt;
  
  
  Visualizing Data
&lt;/h2&gt;

&lt;p&gt;Numbers alone don't always tell the whole story.&lt;/p&gt;

&lt;p&gt;Visualizations help us understand patterns much faster.&lt;/p&gt;

&lt;p&gt;Some commonly used graphs include:&lt;/p&gt;

&lt;h3&gt;
  
  
  Frequency Distribution Table
&lt;/h3&gt;

&lt;p&gt;Shows how many times each value appears.&lt;/p&gt;

&lt;p&gt;Useful for categorical data.&lt;/p&gt;




&lt;h3&gt;
  
  
  Histogram
&lt;/h3&gt;

&lt;p&gt;Used for numerical data.&lt;/p&gt;

&lt;p&gt;It helps us understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Distribution&lt;/li&gt;
&lt;li&gt;Skewness&lt;/li&gt;
&lt;li&gt;Peaks&lt;/li&gt;
&lt;li&gt;Outliers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whenever I open a new dataset, one of the first charts I create is a histogram.&lt;/p&gt;




&lt;h3&gt;
  
  
  Scatter Plot
&lt;/h3&gt;

&lt;p&gt;Scatter plots are useful when working with two numerical variables.&lt;/p&gt;

&lt;p&gt;For example,&lt;/p&gt;

&lt;p&gt;Hours Studied vs Marks&lt;/p&gt;

&lt;p&gt;Experience vs Salary&lt;/p&gt;

&lt;p&gt;Temperature vs Ice Cream Sales&lt;/p&gt;

&lt;p&gt;They help identify relationships and trends.&lt;/p&gt;




&lt;h3&gt;
  
  
  Contingency Table
&lt;/h3&gt;

&lt;p&gt;Used when comparing two categorical variables.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Gender vs Purchased Product&lt;/p&gt;

&lt;p&gt;Department vs Promotion Status&lt;/p&gt;

&lt;p&gt;It helps identify relationships between categories.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Biggest Takeaway
&lt;/h2&gt;

&lt;p&gt;Earlier, I thought statistics was all about formulas.&lt;/p&gt;

&lt;p&gt;Now I see it differently.&lt;/p&gt;

&lt;p&gt;Statistics is simply a way of asking better questions about data.&lt;/p&gt;

&lt;p&gt;Instead of looking at thousands of rows, we summarize, visualize, compare, and understand what's happening.&lt;/p&gt;

&lt;p&gt;Every Machine Learning model, every dashboard, and every business decision starts with this understanding.&lt;/p&gt;

&lt;p&gt;Learning descriptive statistics has made me realize that before predicting the future with AI, we first need to understand the present through data.&lt;/p&gt;

&lt;p&gt;And that's exactly what statistics teaches us.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;In the next blog, I'll explore more about the Statistics, especially Inferential Statistics and explain it the same way—with simple examples, real-world intuition, and practical understanding instead of memorizing formulas.&lt;/p&gt;

&lt;p&gt;If you're also starting Data Science, I hope these notes make your learning a little easier.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>data</category>
      <category>datascience</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Database Fundamentals</title>
      <dc:creator>Sami</dc:creator>
      <pubDate>Sat, 31 Jan 2026 11:16:19 +0000</pubDate>
      <link>https://dev.to/sami21234/database-fundamentals-36ka</link>
      <guid>https://dev.to/sami21234/database-fundamentals-36ka</guid>
      <description>&lt;h2&gt;
  
  
  📚 Database Fundamentals - Learning Notes
&lt;/h2&gt;

&lt;p&gt;Learn database basics in simple language that anyone can understand!&lt;/p&gt;




&lt;h2&gt;
  
  
  📖 What You'll Learn
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Why Data is Important&lt;/li&gt;
&lt;li&gt;What are Databases?&lt;/li&gt;
&lt;li&gt;What Makes a Good Database?&lt;/li&gt;
&lt;li&gt;Different Types of Databases&lt;/li&gt;
&lt;li&gt;Relational Databases Explained&lt;/li&gt;
&lt;li&gt;What is DBMS?&lt;/li&gt;
&lt;li&gt;What Does DBMS Do?&lt;/li&gt;
&lt;li&gt;Understanding Database Keys&lt;/li&gt;
&lt;li&gt;Relationships Between Data&lt;/li&gt;
&lt;li&gt;Problems with Databases&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🎯 Why Data is Important
&lt;/h2&gt;

&lt;p&gt;Think of a database as a &lt;strong&gt;smart filing cabinet&lt;/strong&gt; that stores information in an organized way. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Definition:&lt;/strong&gt; A database is a place where we keep related information together so everyone in a company can use it easily.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Can You Do With Databases?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Store Lots of Information&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Instead of keeping information in many Excel files or paper documents, you can put everything in one place. You can then easily search and find what you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analyze Your Data&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You can ask questions like "How many customers bought products last month?" and get answers quickly. You can also create reports to understand your business better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep Track of Records&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Need to remember who paid you money? What items are in your store? Customer phone numbers? A database keeps all this safe and organized.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run Websites and Apps&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Every time you use Facebook, Amazon, or any app, there's a database working behind the scenes to show you the right information.&lt;/p&gt;




&lt;h2&gt;
  
  
  💾 What are Databases?
&lt;/h2&gt;

&lt;p&gt;Imagine you have a notebook where you write:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Names of your friends&lt;/li&gt;
&lt;li&gt;Their phone numbers&lt;/li&gt;
&lt;li&gt;Their birthdays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A &lt;strong&gt;database&lt;/strong&gt; is like that notebook, but on a computer. It's organized, you can search it super fast, and many people can use it at the same time.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What Makes a Good Database?
&lt;/h2&gt;

&lt;p&gt;A good database should have these 5 things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Integrity (Correctness)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The information should be accurate. If someone's age is 25, it shouldn't suddenly become 250!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Availability (Always Ready)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Whenever you need the data, it should be there. Like 24/7 customer support for your information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security (Protected)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Only the right people should see the information. Your bank details shouldn't be visible to everyone!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Independent of Application (Flexible)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The database should work with any program. Like how a USB drive works with any computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Concurrency (Multi-user)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Many people should be able to use it at the same time without problems. Like how many people can watch Netflix at once.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗂️ Different Types of Databases
&lt;/h2&gt;

&lt;p&gt;Just like there are different types of vehicles (car, bike, truck) for different needs, there are different types of databases:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Relational Databases (SQL)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is like an Excel spreadsheet with tables, rows, and columns. Most popular and widely used!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; MySQL, PostgreSQL, Oracle&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;NoSQL Databases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Good for storing messy data like photos, videos, social media posts, documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; MongoDB (used by companies like Uber, eBay)&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Column Databases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of storing data row by row, it stores column by column. Great for analyzing huge amounts of data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Google BigQuery, Amazon Redshift&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Graph Databases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Perfect for showing connections between things - like your friends on Facebook or recommendations on Netflix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Neo4j, Amazon Neptune&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Key-Value Databases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Super simple - like a dictionary. You have a word (key) and its meaning (value).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Redis, DynamoDB&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which one to pick?&lt;/strong&gt; It depends on what you're building. For most beginner projects, start with Relational Databases!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔄 Relational Databases Explained
&lt;/h2&gt;

&lt;p&gt;Think of a &lt;strong&gt;relational database&lt;/strong&gt; as multiple Excel sheets that are connected to each other.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Sheet 1: Student names and their ID numbers&lt;/li&gt;
&lt;li&gt;Sheet 2: Class names and which students are in them&lt;/li&gt;
&lt;li&gt;These sheets are "related" because they both use student IDs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How it looks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tables&lt;/strong&gt; = Excel sheets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rows&lt;/strong&gt; = Each line of information (like one student)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Columns&lt;/strong&gt; = Types of information (like name, age, email)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🖥️ What is DBMS?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DBMS = Database Management System&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of it as the &lt;strong&gt;manager of your database&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Analogy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Database = Library (where books are stored)&lt;/li&gt;
&lt;li&gt;DBMS = Librarian (who helps you find books, add new books, remove old books)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Popular DBMS software: MySQL, PostgreSQL, Oracle, Microsoft SQL Server&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ What Does DBMS Do?
&lt;/h2&gt;

&lt;p&gt;The DBMS is like a super assistant that does these jobs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Management&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Helps you save information, find it later, and change it when needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keeps Data Accurate (Integrity)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Makes sure the information stays correct. Like preventing you from entering "ABC" as someone's age.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-user Access (Concurrency)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Lets many people use the database at the same time without conflicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transactions&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ensures that when you do something (like transferring money), it either completes fully or doesn't happen at all. No half-done work!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Only authorized people can see or change the data. Like having passwords for your email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Useful Tools (Utilities)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Helps with backup (saving copies), importing/exporting data, and managing users.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔑 Understanding Database Keys
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is a Key?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A key is like a &lt;strong&gt;unique ID&lt;/strong&gt; that helps identify each piece of information in your database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-life example:&lt;/strong&gt; Your Aadhaar card number is unique to you. No one else has the same number.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Keys (Simplified):
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Super Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Any combination of information that can uniquely identify a row.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; In a student table, "Roll Number + Name" can identify a student.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Candidate Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The smallest piece of information that can uniquely identify someone. No extra stuff needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Just "Roll Number" is enough. You don't need the name too.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Primary Key&lt;/strong&gt; ⭐ (Most Important!)
&lt;/h4&gt;

&lt;p&gt;The ONE key you choose to identify each row. It's the main ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Roll Number is the primary key for students.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Must be unique (no duplicates)&lt;/li&gt;
&lt;li&gt;Cannot be empty (no null values)&lt;/li&gt;
&lt;li&gt;Only one primary key per table&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Alternate Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Other candidate keys that you didn't choose as the primary key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Email could also be unique, but you chose Roll Number as primary.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. &lt;strong&gt;Composite Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;When you need TWO or more columns together to uniquely identify a row.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; "Class + Seat Number" together identify a student (because seat numbers repeat in different classes).&lt;/p&gt;

&lt;h4&gt;
  
  
  6. &lt;strong&gt;Surrogate Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;An artificial ID you create when there's no natural unique identifier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Auto-generated customer ID: CUST001, CUST002, CUST003...&lt;/p&gt;

&lt;h4&gt;
  
  
  7. &lt;strong&gt;Foreign Key&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;A key from another table used to connect two tables together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Student table has a "Branch_ID" that connects to the Branch table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Table:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Roll No ⭐&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Branch&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Ash&lt;/td&gt;
&lt;td&gt;CSE&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:ash@gmail.com"&gt;ash@gmail.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Brock&lt;/td&gt;
&lt;td&gt;EEE&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:brock@gmail.com"&gt;brock@gmail.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Tracy&lt;/td&gt;
&lt;td&gt;ME&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:tracy@gmail.com"&gt;tracy@gmail.com&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Here, &lt;strong&gt;Roll No&lt;/strong&gt; is the Primary Key!&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Relationships Between Data
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cardinality&lt;/strong&gt; sounds complex, but it just means: &lt;strong&gt;"How many?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It tells us how many items in one table can connect to items in another table.&lt;/p&gt;

&lt;h3&gt;
  
  
  Easy Examples:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. One Person → One Driving License&lt;/strong&gt; (One-to-One)&lt;br&gt;&lt;br&gt;
Each person has only one driving license, and each license belongs to only one person.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Many Students → One Branch&lt;/strong&gt; (Many-to-One)&lt;br&gt;&lt;br&gt;
Many students can be in the CSE branch, but each student belongs to only one branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. One Restaurant → Many Orders&lt;/strong&gt; (One-to-Many)&lt;br&gt;&lt;br&gt;
One restaurant can have many orders, but each order comes from one restaurant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. One Restaurant → One Menu&lt;/strong&gt; (One-to-One)&lt;br&gt;&lt;br&gt;
Each restaurant has one menu (in this simple case).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Many Students → Many Courses&lt;/strong&gt; (Many-to-Many)&lt;br&gt;&lt;br&gt;
Students can take multiple courses, and each course has multiple students.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Summary:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One-to-One (1:1)&lt;/strong&gt; = Each person has exactly one passport&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-to-Many (1:N)&lt;/strong&gt; = One teacher teaches many students&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Many-to-One (N:1)&lt;/strong&gt; = Many employees work in one department&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Many-to-Many (M:N)&lt;/strong&gt; = Many students attend many classes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚠️ Problems with Databases
&lt;/h2&gt;

&lt;p&gt;Nothing is perfect! Here are some challenges with databases:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complexity&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Setting up a database is not easy. It takes time to learn and do it properly, especially for big systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You need to buy software, powerful computers, and hire people who know how to manage it. This can be expensive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability Issues&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When your data grows too big, the database can become slow. Imagine a closet that's too full - hard to find things!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Accuracy Problems&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When many people update data at the same time, mistakes can happen. Like two people editing the same document simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Risks&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Hackers are always trying to steal data. You need to constantly protect your database from attacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Migration Headaches&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Moving data from one database to another is like moving houses - difficult and time-consuming!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rigid Structure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Once you design your database, changing it later is hard. Like trying to add a room to a house after it's built.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Quick Tips for Beginners
&lt;/h2&gt;

&lt;p&gt;✅ Start with relational databases (SQL) - they're the most common&lt;br&gt;&lt;br&gt;
✅ Practice with small projects - like a contact list or to-do app&lt;br&gt;&lt;br&gt;
✅ Learn SQL commands - they're like English sentences&lt;br&gt;&lt;br&gt;
✅ Don't worry about memorizing everything - understanding concepts is more important&lt;br&gt;&lt;br&gt;
✅ Use free databases like MySQL or PostgreSQL to practice  &lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Want to Contribute?
&lt;/h2&gt;

&lt;p&gt;Found a typo? Want to add more simple examples? Feel free to improve these notes!&lt;/p&gt;




&lt;h2&gt;
  
  
  📜 License
&lt;/h2&gt;

&lt;p&gt;These notes are free to use for learning. Share with friends!&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Thank You
&lt;/h2&gt;

&lt;p&gt;These notes are from my learning journey. I hope they help you understand databases easily!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; Everyone starts as a beginner. Take it one step at a time! 🚀&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Questions? Confused about something? That's normal! Keep reading and practicing - it'll click! 💪&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>🌱 How I Started My Coding Journey in C (2022)</title>
      <dc:creator>Sami</dc:creator>
      <pubDate>Mon, 08 Sep 2025 16:01:09 +0000</pubDate>
      <link>https://dev.to/sami21234/how-i-started-my-coding-journey-in-c-2022-57e1</link>
      <guid>https://dev.to/sami21234/how-i-started-my-coding-journey-in-c-2022-57e1</guid>
      <description>&lt;p&gt;When I started my Engineering in Computer Science and Engineering (AIML) in 2022, I honestly had no idea about coding. Programming felt like a completely new world, and I wasn’t sure where to begin.&lt;/p&gt;

&lt;p&gt;Then came my very first programming language: C.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ My First Experience with C
&lt;/h2&gt;

&lt;p&gt;The very first program I wrote was a simple one — printing numbers from 1 to 1000.&lt;/p&gt;

&lt;p&gt;It might sound small now, but at that moment it felt mind-blowing. The idea that I could give instructions to a machine and see it execute them instantly was something magical.&lt;/p&gt;

&lt;p&gt;That was the moment I realized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; “Computers can do in seconds what would take me hours — if only I learn how to talk to them.”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔑 What C Taught Me
&lt;/h2&gt;

&lt;p&gt;Even though C was just the beginning, it gave me some valuable lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Logic matters more than syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Small programs can spark big curiosity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learning by doing is the best way to grow.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 The Curiosity Spark
&lt;/h2&gt;

&lt;p&gt;That one simple program changed my mindset. I went from:&lt;br&gt;
❌ “Coding looks too hard”&lt;br&gt;
✅ “What else can I make computers do?”&lt;/p&gt;

&lt;p&gt;This curiosity became the fuel for my entire journey ahead — from exploring websites, to JavaScript, React, and even AI/ML.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;If you’re just starting out, don’t underestimate the power of small beginnings. Writing a basic program in C might feel simple, but it can ignite a journey that takes you much further than you imagine.&lt;/p&gt;

&lt;p&gt;For me, it all started in 2022, with a few lines of C code that printed numbers — and it completely changed how I look at technology.&lt;/p&gt;




&lt;p&gt;👉 This is Part 1 of my journey. In the next blog, I’ll share how my curiosity about the web led me to HTML, CSS, and the world of Web&amp;nbsp;Development.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
