Happy Monday!
When starting out with SQL, you'll quickly encounter lots of new terms: databases, schemas, DBMS, servers, data types, and more. It might seem overwhelming—but don't worry, I've got you covered! I’ve covered all these topics using animated sketches to help you confidently begin your SQL journey:
What is SQL & Database?
Meet Michael. He deals with lots of information daily—bank records, car details, utility bills—all stored across separate spreadsheets, notes, and files. When he wants to figure out his total spending, he needs to open each file and do the math himself. It’s slow and frustrating.
Now imagine a company managing 30 million records—customers, products, and sales data. Keeping all this in separate files isn’t practical. That's why databases exist. They organize huge amounts of data in one place, neatly connected.
To easily get answers from databases, you use SQL (pronounced sometimes “sequel”). It stands for Structured Query Language, a simple way to ask databases exactly what you want. Instead of digging through multiple files like Michael, SQL quickly gives you just what you need.
What is DBMS and Database Server?
Databases store large amounts of organized data. But to make databases available anytime, anywhere, they live on servers—powerful computers that are often in the cloud. These servers run 24/7, so data is always ready when you need it.
Now, databases are popular—many users, apps, and tools all want to interact with them at the same time. This could easily get messy, right? That’s why databases use a special software called a Database Management System (DBMS). Think of it as the manager. It controls who can access the data, organizes requests, and ensures everything runs smoothly without conflicts.
People, apps (like websites or mobile apps), and even reporting tools (like Power BI) interact with databases using SQL. They send their requests through the DBMS, which manages each interaction carefully. This keeps data secure, organized, and accessible for everyone.
Types of Databases
Not all databases are the same—they come in different types to handle different data needs:
Relational Databases store data in structured tables with clear connections. Common examples are Microsoft SQL Server, PostgreSQL, and MySQL.
Document Databases (like MongoDB) store data in flexible documents, ideal when your data frequently changes or doesn’t fit into strict tables.
Graph databases (like Neo4j) are great at handling relationships, making them useful for social networks or complex connections.
Key-value stores (like Redis or Amazon DynamoDB) are simple, fast databases designed for quick lookups.
Column-based databases (such as Apache Cassandra or Amazon Redshift) efficiently handle large datasets by focusing on columns rather than rows, often used in analytics.
The most common type is the relational database.
Database & Table Structure
Databases are highly organized and follow a strict structure:
Server: At the top is a server (a powerful computer) that holds multiple databases.
Database: Each database serves a specific purpose—for example, one database for Sales, another for HR. Databases are further divided into schemas.
Schema: Schemas are like folders grouping related information logically (for instance, one schema for customers and another for orders). Each schema contains multiple objects.
Tables: Tables store the actual data, neatly organized into rows and columns.
Table's structure
Columns: Represent categories or attributes of data (e.g., Name, ID, Birthdate).
Rows: Each row is a single record containing specific data about one person, item, or event.
Values: Individual pieces of information stored in each cell, at the intersection of a row and column.
Primary Key: A unique identifier for each row, ensuring every record can be distinctly recognized (for example, an ID number).
Every column in a table has a data type, defining what kind of data it can store:
Numeric types: store numbers (integers like 1, 2, 30, or decimals like 3.14).
Text types: store characters or words (e.g., names like "Maria" or "John").
Date & Time types: store dates ("2025-10-30") or times ("09:30:00").
Choosing the right data type ensures that your data remains accurate and organized.
SQL Commands
SQL commands are instructions used to create, manage, and query databases, allowing you to easily handle and access data.
Data Definition Language (DDL):
These commands create and define the structure of your database. For example:CREATE
to build new tables or databases.ALTER
to modify existing structures.DROP
to delete tables or databases.
Data Manipulation Language (DML):
Commands that allow you to handle data within your tables. Examples include:INSERT
to add new data into tables.UPDATE
to change existing data.DELETE
to remove data.
Data Query Language (DQL):
Used specifically to retrieve or query data from tables. The most common command is:SELECT
, which lets you ask questions and retrieve specific information from your database.
Why Learn SQL ?
Weekly Wisdom
"Facing challenges today makes you stronger for tomorrow"
If you have questions or tips to share, I’d love to hear from you.
Happy querying!
Baraa
Hey friends —
I’m Baraa. I’m an IT professional and YouTuber.
My mission is to share the knowledge I’ve gained over the years and to make working with data easier, fun, and accessible to everyone through courses that are free, simple, and easy!