Databases & SQL · Foundations
SQL Basics
On this page 9 sections
In 30 seconds
SQL The standard language for working with data in relational databases; the letters stand for Structured Query Language. Full entry → — Structured query A statement that asks a database for data; a query reads and changes nothing. Full entry → Language, pronounced 'sequel' or 'S-Q-L' — is the standard A formally agreed specification — here, the ANSI/ISO SQL standard — that database products aim to follow. Full entry → language for working with relational databases. It does four things with data: retrieve it, add it, change it, and remove it. Those operations split into two families: queries that read data and commands that change it. SQL is declarative Describing a language in which you state what you want and the system decides how to do it, rather than spelling out every step. Full entry →: you say what you want, and the database A structured, organized collection of data managed by a database system; SQL is how people talk to it. Full entry → figures out how to get it. The language is standardized but varies slightly between database products. It looks simple and gets deep — but the basics are learnable.
Why this matters
Every app that stores accounts, orders, or inventory is talking to a database, and SQL is the common language those databases speak. Knowing what SQL is and what it does lets you see how software works under the hood, and the skill transfers across nearly every data job — analysts, engineers, and scientists all query databases. Because SQL is declarative, you can ask questions about data without knowing how the database walks its tables, which is why it is the first data language most people learn. And it is the foundation for everything deeper: every command from SELECT to DELETE builds on the basics here.
The college version
What SQL is
SQL stands for Structured Query Language, and W3Schools' tutorial defines it plainly: SQL is a standard language for accessing and manipulating databases. Wikipedia puts the same idea in slightly different words: SQL is a domain-specific language used to manage data, especially in a relational database A database that stores data in tables of rows and columns, with relationships between the tables; earlier lessons cover this in depth. Full entry → management system. So the working definition has two parts: SQL is a language, and its job is working with the data in relational databases — the kind of database that stores information in tables of rows and columns, which earlier lessons covered. Even the name carries history. The language began at IBM as SEQUEL, short for Structured English Query Language, built on the relational model; SEQUEL later became SQL and is still pronounced 'sequel.' Today many people also spell it out, 'S-Q-L,' and both pronunciations are acceptable.
What SQL does: four operations
SQL's work with data comes down to four operations. W3Schools lists them among the things SQL can do: execute queries against a database, retrieve data from a database, insert records, update records, and delete records. Oracle's SQL documentation describes the same core tasks — querying data and inserting, updating, and deleting rows in a table. In plain words: SQL reads data, adds data, changes data, and removes data. Everything else the language does — creating tables, setting permissions, building views — supports or surrounds those four. The commands themselves — SELECT for reading, INSERT for adding, UPDATE for changing, DELETE for removing — each get their own lesson in this course; here the point is simply that these four operations are the heart of the language.
Two families: queries and commands
Those four operations fall into two families, and the split is worth seeing clearly. One family reads: queries that retrieve data and change nothing. The other family writes: commands that add, change, or remove data. W3Schools' introduction keeps retrieving data separate from inserting, updating, and deleting records, and that separation is practical, not cosmetic. A read can be run again and again with no effect on the stored data — ask the same question a hundred times and the data stays as it was. A write is different: it permanently alters the database. That is why careful database work treats reads as freely repeatable and writes as changes to be made deliberately. SELECT belongs to the read family; INSERT, UPDATE, and DELETE belong to the write family.
SQL is declarative: what, not how
SQL is declarative, and this is the idea that makes it approachable. In a declarative language you say what you want, and the system decides how to deliver it. Oracle's documentation describes the mechanism: to retrieve a set of rows from a table, you define a condition that filters the rows, and all rows satisfying the condition are retrieved in a single step — you do not deal with the rows one by one. Suppose you want all customers in Portland. You do not write instructions to open the table, walk row by row, check each city value, and copy the matches. You simply ask for all customers in Portland, and the database handles the walking. That is the whole point of SQL: describe the outcome you want, and let the database do the work.
Standard, but not identical
SQL is a standard, but not a single identical product. W3Schools explains that SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987, and that although SQL is an ANSI/ISO standard, there are different versions of the language. To be compliant with the standard, database programs all support the major commands in a similar manner — but most also add their own proprietary extensions. Wikipedia records the current standard as ISO/IEC 9075. In practice this means: learn SQL once, and nearly everything transfers to another database, but expect small differences when you switch products. Microsoft SQL Server, for instance, speaks its own dialect A product-specific version of SQL that follows the standard and adds its own extensions, such as Microsoft's Transact-SQL. Full entry →, Transact-SQL, built on the standard. The standard is a common core, not a single voice.
The common language of data work
Why does SQL matter? Because it is the common language of data work. Oracle's SQL documentation calls it exactly that — the common language for all relational databases — noting that all major relational database management systems support SQL, so the skills you gain transfer from one database to another. Software applications, analysts, engineers, and scientists all meet at the data layer through SQL: behind almost every app that stores accounts, orders, or inventory, a database is answering SQL questions. Learning the language once gives you a way to talk to nearly any database you will meet, which is a rare kind of portability in technology.
The honest framing
Here is the honest framing, stated plainly: SQL looks simple and gets deep. The core operations are a handful of ideas — genuinely learnable in an afternoon of reading. But real-world SQL grows: filtering, sorting, joining tables, grouping, transactions, and performance all layer on top of the basics, and each of those layers is its own topic, several of them later lessons in this course. That depth is not a reason to be intimidated; it is a reason to start. The basics — what SQL is, what it does, and how it thinks — are the foundation every deeper topic stands on. This lesson is that foundation.

Eli explains
The same idea, in plain words
Explain it like I’m 10
SQL is how people talk to databases. It is short for Structured Query Language, and it is the standard way to get data out of a database, put data in, change it, or remove it. The trick that makes SQL friendly is that it is declarative: you say what you want, and the database works out how. 'Give me all our customers in Portland' — the database does the searching. SQL comes in two families: queries, which read data and change nothing, and commands, which add, change, or remove data. The language is standardized, so what you learn works in most database products, though each one adds small differences of its own.
Picture it like this
Ordering at a restaurant is a good picture of SQL. You tell the waiter what you want — 'the mushroom risotto' — and the kitchen figures out the steps: wash, chop, cook, plate. You do not walk into the kitchen and give directions. Most restaurants work the same way (the standard), yet each kitchen has house specialties (the extensions), and you can walk into a new restaurant and order without retraining. Asking what is on the menu is a read; sending a dish back for a change is a write.
Where the picture stops working
The analogy breaks down because SQL still has strict grammar: you cannot say it in free English — the database needs statements written in its own syntax, and a malformed request returns an error or nothing at all. And while an order changes only your meal, a write command changes data that everyone shares, so writes are treated more carefully than the analogy suggests.
Worked example
Riverbend Books keeps a customers table with a name column and a city column. The owner wants a list of everyone in Portland, and in a spreadsheet she would filter the city column by hand. With SQL she writes one line: SELECT name FROM customers WHERE city = 'Portland'; — she describes what she wants, and the database finds the rows for her. She can run that same read every morning; it never changes the table. When a new Portland customer is added later — an insert, a write operation from the other family — the same query simply shows one more name. She described the outcome she wanted and never once told the database how to search.
Key takeaway
SQL is the standard, declarative language of relational databases: you describe what data you want or need changed, and the database handles the how — the basics are simple enough to learn, and everything deeper builds on them.
Quick check
3 questions here, of 5 in this lesson’s practice set. Answers stay hidden until you check.
A coworker says SQL is declarative. What does that mean?
Harbor Books wants the names of all customers in Portland. Which approach is the declarative one?
Study tools & related lessonsYou’ll learn to · Common mistakes · Easily confused · Key vocabulary · Related
You’ll learn to
- Define SQL as Structured Query Language, the standard language for accessing and manipulating relational databases.
- Name the four core operations SQL performs on data: retrieve, add, change, and remove.
- Distinguish the two families of SQL statements: queries that read data and commands that change it.
- Explain what it means for SQL to be declarative, using the example of asking for all customers in Portland.
- Explain why SQL is standardized yet varies between database products, with dialects such as Transact-SQL.
- Recognize that SQL's basics are learnable even though the language grows deep with additional topics.
Common mistakes
Expecting SQL to behave identically in every database product.
The major commands are standardized, but products add their own extensions and small differences. Learn the standard core; expect to adapt when you switch products.
Assuming a query changes the data it reads.
Queries only retrieve. Adding, changing, or removing data is the job of write commands, which have their own lessons.
Treating SQL like a step-by-step programming language.
SQL is declarative: describe the data you want and let the database work out how. Spelling out every step yourself is the opposite of SQL's design.
Confusing the language with a product — for example, thinking 'SQL' and 'SQL Server' are the same thing.
SQL is the standard language; SQL Server, PostgreSQL, MySQL, and SQLite are database products that speak it, each with its own dialect.
Giving up when SQL starts to look deep.
The depth is layered on top of a small core — read, add, change, remove. Each deeper topic builds on the basics one at a time.
Easily confused
SQL (the language) vs. A database product (like SQL Server or PostgreSQL)
SQL is the standard language for working with data; a product is a system that speaks SQL, following the standard and adding its own dialect.
A query (a read) vs. A command that writes
A query retrieves data and changes nothing, so it can be run again and again; a write adds, changes, or removes data, permanently altering the database.
Declarative thinking vs. Procedural thinking
Declarative means stating what you want and letting the system find the way; procedural means spelling out every step yourself, which is how SQL does not work.
Key vocabulary
- SQL
- The standard language for working with data in relational databases; the letters stand for Structured Query Language.
- relational database
- A database that stores data in tables of rows and columns, with relationships between the tables; earlier lessons cover this in depth.
- query
- A statement that asks a database for data; a query reads and changes nothing.
- declarative
- Describing a language in which you state what you want and the system decides how to do it, rather than spelling out every step.
- read operation
- A statement that retrieves data without modifying it, such as asking for a list of customers.
- write operation
- A statement that adds, changes, or removes data, permanently altering the database.
- statement
- One complete instruction written in SQL, ending with a semicolon.
- standard
- A formally agreed specification — here, the ANSI/ISO SQL standard — that database products aim to follow.
- dialect
- A product-specific version of SQL that follows the standard and adds its own extensions, such as Microsoft's Transact-SQL.
- database
- A structured, organized collection of data managed by a database system; SQL is how people talk to it.
Sources & references
- SQL Introduction — W3Schools
- Oracle Database SQL Language Reference (23c): Introduction to Oracle SQL — Oracle
- SQL (Wikipedia) — Wikipedia
- What is SQL Server? (Microsoft Learn) — Microsoft Learn
- PostgreSQL Documentation 18: Chapter 2. The SQL Language — 2.2. Concepts — The PostgreSQL Global Development Group
EliExplains lessons are original prose written from the open, credible references above. See Copyright & Licensing.
Researched 2026-08-21
Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.

