Before storing data, you need to create tables that define the structure of your database.
Use CREATE TABLE
followed by the table name and a list of columns with their data types.
Example:
CREATE TABLE students (
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER,
join_date DATE
);
INTEGER
— Whole numbersTEXT
— Strings or textDATE
— DatesBOOLEAN
— True/False valuesFLOAT
or REAL
— Decimal numbersA primary key uniquely identifies each row. It’s important for relationships and indexing.
Creating tables is the first step to organizing your data efficiently.