What is SQL & Databases
SQL (Structured Query Language) is the standard language for interacting with relational databases. A database is an organized collection of structured data stored electronically. SQL lets you create, read, update, and delete that data — making it one of the most essential skills for any developer or data professional.
Core Concepts
- SQL — Structured Query Language for managing relational data
- Database — Organized collection of structured data in tables
- Table — Rows (records) and columns (fields) — like a spreadsheet
- DBMS — Database Management System (MySQL, PostgreSQL, SQLite)
- RDBMS — Relational DBMS that links tables through relationships
- SQL is declarative — you say WHAT you want, not HOW to get it
- SQL is case-insensitive: SELECT = select = Select
- Standard SQL is supported by all major databases
SQL in Action
-- SQL is used to interact with databases
-- Every action is a SQL statement
-- Retrieve data
SELECT name, email FROM users;
-- Add data
INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');
-- Update data
UPDATE users SET email = 'new@example.com' WHERE id = 1;
-- Delete data
DELETE FROM users WHERE id = 1;
-- SQL categories:
-- DQL - Data Query Language → SELECT
-- DML - Data Manipulation → INSERT, UPDATE, DELETE
-- DDL - Data Definition → CREATE, ALTER, DROP
-- DCL - Data Control → GRANT, REVOKE
-- TCL - Transaction Control → BEGIN, COMMIT, ROLLBACKTip
Tip
SQL is the universal language for databases. Learning SQL once works across MySQL, PostgreSQL, SQLite, SQL Server, and Oracle — you don't need to learn a new language for each one. Focus on standard SQL first, then learn vendor-specific features.
JOINs combine rows from two tables based on related columns
Common Mistake
Warning
Beginners often confuse SQL (the language) with specific database engines like MySQL or PostgreSQL. SQL is the language you write queries in. MySQL and PostgreSQL are the database management systems (DBMS) that execute those queries. They all understand SQL but have minor dialect differences.
Practice Task
Note
Try writing these four SQL statement types from memory: a SELECT to read data, an INSERT to add a row, an UPDATE to change a value, and a DELETE to remove a row. Use any table name you like — the goal is to memorize the basic syntax patterns.
Quick Quiz
Key Takeaways
- SQL (Structured Query Language) is the standard language for interacting with relational databases.
- SQL — Structured Query Language for managing relational data
- Database — Organized collection of structured data in tables
- Table — Rows (records) and columns (fields) — like a spreadsheet