Skip to main content

Command Palette

Search for a command to run...

πŸ“‹ SQL Explained Like You're 5

Published
β€’2 min read
S

Building AI systems and writing about how they actually work. Master of AI @ University of Technology Sydney. Previously B.Tech CS with focus on IoT. I believe the best way to learn is to explain. That's why I'm documenting tech concepts with simple analogies (@sreekarreddy.com). AWS Certified β€’ Azure AI Certified β€’ Neo4j Professional β€’ Google Data Analytics When not coding: exploring Sydney, working on side projects, and teaching tech to anyone who'll listen.

Speaking the language databases understand

Day 65 of 149

πŸ‘‰ Full deep-dive with code examples


The Restaurant Order Analogy

At a restaurant, you tell the waiter:

  • "I'd like the pasta" β†’ SELECT
  • "Add extra cheese" β†’ INSERT
  • "Change my drink to water" β†’ UPDATE
  • "Cancel the dessert" β†’ DELETE

SQL is how you tell databases what you want!

It's the language for asking questions and giving instructions.


What SQL Does

SQL (Structured Query Language) lets you:

  • Ask questions β†’ Find all customers from Sydney
  • Add data β†’ Insert a new order
  • Change data β†’ Update a customer's address
  • Remove data β†’ Delete an old record

All in simple, readable commands.


The Basic Commands

SELECT (reading data):

SELECT name, email FROM customers WHERE city = 'Sydney'

"Give me names and emails of Sydney customers"

INSERT (adding data):

INSERT INTO customers (name, email) VALUES ('Alice', 'alice@mail.com')

"Add a new customer named Alice"

UPDATE (changing data):

UPDATE customers SET email = 'new@mail.com' WHERE name = 'Alice'

"Change Alice's email"

DELETE (removing data):

DELETE FROM customers WHERE name = 'Bob'

"Remove Bob from the database"


Why SQL Matters

  • Universal β†’ Most databases use it
  • Readable β†’ Almost like English
  • Powerful β†’ Complex queries possible
  • Been around forever β†’ Lots of tools and knowledge

Key Concepts

  • Tables β†’ Like spreadsheets with rows and columns
  • Rows β†’ Each entry (one customer, one order)
  • Columns β†’ The properties (name, email, date)
  • Queries β†’ Questions you ask the database

In One Sentence

SQL is the simple, English-like language for asking databases to find, add, update, or delete data.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

More from this blog

esreekarreddy

132 posts