Getting Started Lesson 1 of 21
Introduction to SQL and Databases
What a database is, what tables, rows and columns are, what SQL does, and your first query run live in the browser.
Every app you use stores data somewhere: GCash keeps your transactions, Facebook keeps your posts, your school keeps your grades. That data usually lives in a database, and the language used to talk to most databases is SQL.
What is a database?
A database is an organized collection of data that a computer can search, sort and update quickly. Think of it as a set of very smart spreadsheets that can hold millions of rows and answer questions in a fraction of a second.
Tables, rows and columns
A relational database stores data in tables. Each table is about one kind of thing:
| id | name | category | price | stock |
|---|---|---|---|---|
| 1 | Pandesal (10 pcs) | Bread | 25 | 40 |
| 2 | Instant Noodles | Noodles | 15 | 120 |
| 3 | Canned Sardines | Canned Goods | 24 | 60 |
- A column (field) is one kind of information:
name,price,stock. - A row (record) is one item: everything about Instant Noodles.
- The
idcolumn gives every row a unique number, so each product can be identified exactly. It's called the primary key.
Your first query
A command in SQL is called a query. Press Run this query below:
SELECT * FROM products;
In plain English: "select everything (*) from the products table." The database answers with all 15 rows. Now try changing products to customers and run it again.
A more specific question
SELECT name, price
FROM products
WHERE price < 20
ORDER BY price;
Even without learning SQL yet, you can read this: show the name and price of products cheaper than ₱20, sorted by price. That readability is SQL's superpower.
What can SQL do?
- Read data:
SELECT - Add data:
INSERT - Change data:
UPDATE - Remove data:
DELETE - Create and change tables:
CREATE TABLE,ALTER TABLE
Reading data with SELECT is by far the most common, so most of this course is about asking good questions.
SQL databases you'll hear about
SQL is a standard language used by many database systems: MySQL and MariaDB (very common for websites and school systems), PostgreSQL, Microsoft SQL Server, Oracle and SQLite (built into every phone). The basics are the same in all of them. Our in-browser editor uses SQLite; the few differences from MySQL are pointed out when they matter.
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04