🚀 Day 4: What is SQL? + CRUD Operations + Database Structure Explained with a Student Table Example


Welcome to Day 4 of my SQL Tutorial Series! 👋
So far, we’ve learned what a database is, types of databases, and the role of a DBMS.
Now, it’s time to talk about SQL itself, the operations it enables, and how data is organized.
Let’s break it down step by step!
💬What is SQL?
SQL stands for Structured Query Language. It’s a language we use to interact with a relational database.
In simple words:
SQL lets you ask questions to your database,
insert new information,
update existing data,
delete data,
and define or change the structure of your tables.
SQL works like a translator between you (the user/developer) and the database (where the data lives).
✍️CRUD Operations – The 4 Core Actions of SQL
A big part of SQL revolves around CRUD operations:
CRUD Action | SQL Command | Meaning |
Create | INSERT | Add new data to a table |
Read | SELECT | Retrieve data from a table |
Update | UPDATE | Modify existing data in a table |
Delete | DELETE | Remove data from a table |
🏗️Understanding Database Structure
A database is made up of tables.
Each table is like a spreadsheet:
Columns (fields) define the structure → what kind of data we’re storing.
Rows (records) hold the actual data entries.
Let’s visualize a Student table:
StudentID | Name | Age |
1 | Alice | 20 |
2 | Bob | 22 |
3 | Carol | 19 |
Here:
Columns = StudentID, Name, Age (structure/attributes)
Rows = individual students (actual data)
Each row follows the structure defined by the columns.
🔗How Tables are Interrelated
In a relational database, tables are often connected (related) to each other through keys. For example, let’s say we also have a Course table and an Enrollment table:
📘 Course Table
CourseID | CourseName |
101 | Math |
102 | History |
📝 Enrollment Table (many-to-many relationship)
StudentID | CourseID |
1 | 101 |
1 | 102 |
2 | 101 |
StudentID in Enrollment links back to Student table.
CourseID in Enrollment links back to Course table.
This structure lets us answer questions like:
🔍 “Which students are enrolled in Math?”
🔍 “What courses is Alice taking?”
🧠Why is this Structure Important?
Tables are separated by entity (Student, Course, Enrollment) to avoid repeating data.
Relationships let us combine tables with JOINs to answer complex queries.
Instead of storing course names directly inside the Student table, we use keys to reference other tables. This keeps the data organized, normalized, and efficient.
🎯Key Takeaways for Day 4
SQL is the language to interact with relational databases.
The 4 main operations are CRUD → Create, Read, Update, Delete.
A database has tables made of columns (structure) and rows (data).
Tables can be interrelated using keys, allowing complex data models.
👩💻Try it Yourself:
If you’re using an online SQL editor or a local DB, try creating your own Student table:
CREATE TABLE Student (
StudentID INT PRIMARY KEY,
Name VARCHAR(50),
Age INT
);
INSERT INTO Student VALUES (1, 'Alice', 20), (2, 'Bob', 22), (3, 'Carol', 19);
SELECT * FROM Student;
✅ Congrats—you’ve just created a table, added data, and read it with SQL!
🙌 Wrapping Up Day 4
We’ve now built a mental model of how SQL works, how data is structured in tables, and how CRUD operations let us manage the data.
Tomorrow, we’ll dive deeper into CREATE DB, tables, DROP tables, SELECT queries etc.
Thanks for following along! See you on Day 5! 🚀
Subscribe to my newsletter
Read articles from Rishitha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
