☰ Learn SQL Tutorial Menu

What is SQL? Databases 101

Written by CSA mentors · Updated 16 Sept 2026 · 3 min read


SQL (Structured Query Language) is the language used to talk to relational databases — the kind of database that stores data in tables made of rows and columns, similar to a spreadsheet, but far more powerful because tables can be linked together.

Why SQL matters

Almost every application you use — banking apps, e-commerce sites, this very institute's own student portal — stores its data in a relational database and uses SQL to read and write that data. Learning SQL is one of the highest-leverage skills in data analytics, software engineering, and business intelligence.

What is a relational database?

A relational database organizes data into tables. Each table has:

  • Columns — the fields, e.g. first_name, salary, price.
  • Rows — individual records, e.g. one employee, one order.

Tables are related to each other through shared columns — for example, an orders table might reference which customer placed it. That's what makes it "relational."

The four categories of SQL commands

CategoryStands forPurposeExample commands
DQLData Query LanguageAsk questions / read dataSELECT
DMLData Manipulation LanguageChange dataINSERT, UPDATE, DELETE
DDLData Definition LanguageChange table/database structureCREATE, ALTER, DROP
DCLData Control LanguageManage permissionsGRANT, REVOKE

This course covers all four, starting with DQL (the part you'll use most often) and building up to database design and performance.

Popular database engines

SQL is a standard, but every database engine has its own small differences in syntax. This course — and the Code Playground — lets you practice on all four major engines you'll encounter in the real world:

  • SQLite — a tiny, file-based database. Great for learning and for small apps.
  • PostgreSQL — a powerful, free, open-source database used by countless startups and enterprises.
  • MySQL — one of the most widely used open-source databases, popular in web development.
  • SQL Server — Microsoft's enterprise database, common in corporate environments.

The good news: 95% of what you learn transfers directly between all of them. This course will point out the small differences whenever they matter.

Lesson 1 of 27

Sign in to track your progress and earn learning points for every lesson you finish.

Example

-- A ready-to-query practice database is loaded automatically before every run —
-- no CREATE TABLE needed. Available tables:
--   departments  (id, name, location)
--   employees    (id, first_name, last_name, email, department_id, job_title, salary, hire_date, manager_id)
--   customers    (id, customer_name, city, country, signup_date)
--   products     (id, product_name, category, price, stock_quantity)
--   orders       (id, customer_id, employee_id, order_date, status)
--   order_items  (id, order_id, product_id, quantity, unit_price)

SELECT * FROM employees WHERE department_id = 1;
Try it Yourself »