🗃️Database Table
Also known as Table, SQL Table
One kind of data in a database. It is set out in rows and columns.
Think of it like
Think of it like a class list. Each pupil gets a line, and each line has the same boxes to fill.
Example
Jack's shop has a customers table and an orders table. Each order row points to the customer who placed it.
Why it matters
Tables give data a fixed shape. That shape is what makes searching and checking it reliable.
Definition
Example code
sql
CREATE TABLE customers (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
city TEXT
);Common mistake
Key takeaways
- 1One kind of thing. Customers here, orders there.
- 2Same columns. Every row has the same boxes.
- 3Tables link up. Keys point from one to another.