GENAI 102
M02 · L06
Software Engineering

Databases Basics

A database is where an app’s data lives so it survives between sessions — and can be searched. Close the app, reopen it tomorrow, and your tasks, notes and settings are still there.

01 / 08
GENAI 102
M02 · L06
The Landscape

Two Big Families

Most databases fall into one of two camps. Knowing which is which is half the battle.

SQL / Relational
Tables, rows & columns; strong structure. e.g. Postgres, SQLite
NoSQL
Flexible documents or key–value pairs. e.g. MongoDB, key–value stores
02 / 08
GENAI 102
M02 · L06
The Four Operations

Everything Is CRUD

Almost every app does just four things to its data. Learn these and you understand what a database is for.

  • Create — add a new record
  • Read — look one up or search for it
  • Update — change an existing record
  • Delete — remove it
03 / 08
GENAI 102
M02 · L06
Choosing One

When Each Fits

The shape of your data usually decides for you.

Rule of Match
Reach for relational when data is structured and related — users, tasks, and notes that link to each other. Reach for NoSQL when the shape varies from record to record, or you just need simple, fast lookups.
04 / 08
GENAI 102
M02 · L06
Rule of Thumb

Start Simple

A builder’s instinct: begin with the simplest thing that works — even SQLite, a whole database in a single file — and only add complexity when you actually need it. Most first projects never outgrow it.

05 / 08
GENAI 102
Build It
From Concept to Capstone

Sketch a Schema

How to implement: list the “things” your tool stores, and write one line of fields for each — e.g. Task: id, title, status, week. That’s your first schema.

  • Weekly AI Tasks tracker — naturally relational: Main Tasks, daily entries, and notes that link to them. A small SQL database fits well.
  • Personal brand site — usually needs no database at all; the content lives in files, which is simpler and cheaper.
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

A database keeps data between sessions. There are two families — SQL/relational and NoSQL — every app does CRUD, and the builder’s move is to start simple and grow only when you must.

Next Lesson
08 / 08