Tag

#database

30articles
BasicsOct 27, 2026

text vs varchar — which to use in Postgres, and where the number 255 came from

text vs varchar in PostgreSQL and Supabase: the real difference, why varchar(255) is a MySQL habit, how to limit length and what a beginner should pick.

6 min read
?
BasicsOct 15, 2026

What is optimistic locking — and where did the new price go

Optimistic locking in plain words: how two editors silently overwrite each other, and how a version column in your database catches the conflict before it lands.

6 min read
BasicsOct 8, 2026

What is a singleton — and why your dev database says "too many connections"

A singleton, explained simply: one instance for the whole app. Why hot reload multiplies database connections and how globalThis fixes it.

5 min read
BasicsAug 30, 2026

What is SQL injection — and why the surname O'Brien breaks your site

SQL injection is when text from a form becomes a command for your database. We use an apostrophe in a surname to show why «stripping quotes» never works.

5 min read
GuidesAug 23, 2026

Why my database backup won't restore — three causes and the fix

Your database dump won't restore: a pg_dump version error, the wrong file format, or ownership permissions. Three causes and the exact commands that fix them.

6 min read
BasicsAug 23, 2026

What is database normalization — and why one big table breaks later, not now

Database normalization in plain words: the three problems of a wide table, the three normal forms explained simply, and when duplicating data is actually right.

6 min read
BasicsAug 23, 2026

What is a JOIN in SQL — and why LEFT JOIN quietly drops rows

JOINs in plain words: how to stitch two tables in one query, how INNER differs from LEFT, and the two traps that make the total in your report wrong.

6 min read
BasicsAug 23, 2026

What is a foreign key — and why it quietly slows down deletes

Foreign keys in plain words: how the database blocks orders from users who don't exist, what ON DELETE CASCADE does, and why you must add the index yourself.

6 min read
GuidesAug 23, 2026

How to add an audit log — step by step, so it doesn't lie to you

How to add an audit log to your database: a PostgreSQL trigger in 20 minutes, recording the real app user, and locking the journal against edits. With code.

7 min read
BasicsAug 22, 2026

Backup vs replica — which one actually saves your database

Backups and replicas protect against different things: a replica against a dead server, a backup against your own mistake. The difference, and what to pick.

6 min read
BasicsAug 18, 2026

What is a soft delete — why the «Delete» button usually deletes nothing

A soft delete marks a row as deleted instead of removing it. Why apps do this, and the three traps every beginner walks into — including one that locks users out.

5 min read
GuidesAug 17, 2026

How to back up your database — and why the free plan doesn't do it for you

Step by step: how to dump your database with one command, where to keep the copy and how to prove it works. Plus the trap — files aren't in that backup.

6 min read
BasicsAug 16, 2026

What is a database schema — and why «schemaless» doesn't exist

A schema is the shape contract for your data: tables, fields, types. Here's how it catches garbage at write time — and where it hides in «schemaless» databases.

5 min read
BasicsAug 16, 2026

What is a deadlock — and why the «deadlock detected» error just saved you

A deadlock is a mutual block: two processes hold a resource each and wait for each other forever. How the database detects deadlocks — and how not to create them.

5 min read
GuidesAug 7, 2026

How to add pagination — page by page, without duplicates or deep-page lag

How to add pagination to your app: the working path from simple OFFSET to a cursor. Five steps, real code, and why posts repeat across pages.

6 min read
GuidesAug 5, 2026

Why my database connection fails — three causes and how to tell them apart in a minute

Database connection errors: too many clients, ENETUNREACH and failed authentication. Diagnose each one by its symptom and fix it.

5 min read
BasicsAug 5, 2026

What is a primary key — and why the id in your URL leaks more than you think

Primary keys in plain words: what they're for, why email makes a bad key, and what to pick — auto-increment, UUIDv4 or UUIDv7.

5 min read
BasicsAug 4, 2026

What is a database transaction — and why money doesn't vanish halfway

A database transaction is all-or-nothing for a group of queries. Here's what it's for, how COMMIT and ROLLBACK work, and where beginners quietly lose data.

5 min read
BasicsAug 2, 2026

Database or spreadsheet — what to use for your first project

Spreadsheets don't break on volume: 10 million cells is fine. Here's where they actually break, where a database is overkill, and what to pick.

5 min read
GuidesJul 30, 2026

Why your database query is slow — and why it was fast on your own data

Why a database query is slow: the three real causes, how to check each in a minute, and how to fix it. Starting with the most common — a missing index.

6 min read
BasicsJul 28, 2026

What is a UUID — and why the id in your database looks like gibberish

A UUID is a long id like 550e8400-e29b-41d4… Here's why it beats 1, 2, 3, what plain numbers leak, and what the new UUIDv7 fixes.

5 min read
BasicsJul 25, 2026

What is a database index — and why your query reads the whole table

Your app flew on 200 rows and died on 50,000. What a database index is, how to spot a missing one with a single command, and which columns deserve one.

5 min read
BasicsJul 21, 2026

SQLite vs Postgres — which one for your first project

SQLite is a database in a single file next to your code; Postgres is a separate server. An honest comparison: setup, deploys, users — and what to pick.

5 min read
BasicsJul 19, 2026

What is a database migration — it's git for your schema, not moving data

A database migration isn't moving data — it's a version of your table structure. What it is, how it works, and why you need one even solo.

5 min read
GuidesJul 19, 2026

How to add search to your app — from a simple filter to search by meaning

How to add search to your app: 4 levels from an in-memory filter to search by meaning. Start with one line of SQL — most projects never outgrow it.

6 min read
BasicsJul 16, 2026

PostgreSQL or MySQL — which to pick for a first project, no holy wars

PostgreSQL and MySQL are both free SQL databases, but tuned for different things. We compare on cost, learning curve and use case — and say plainly what to pick.

5 min read
BasicsJul 8, 2026

What is an ORM — working with a database without writing SQL

An ORM is a translator between your code and your database: you write user.save() instead of an SQL query. Here's what it's for — and where its big catch hides.

5 min read
BasicsJun 15, 2026

SQL or NoSQL — which to pick for a first project, no dogma

SQL is strict tables with relations, NoSQL is flexible document-cards. We compare them where it counts and say plainly what a beginner should take.

5 min read
GuidesJun 15, 2026

How to set up a database for your app — step by step, no server of your own

You don't need to run a server: a free database goes live in 10 minutes. A step-by-step walkthrough on Supabase — from empty project to your first row.

6 min read
BasicsJun 14, 2026

What is a database — in plain words, and why nothing sticks without one

A database is an app's memory that survives a restart. Explained simply: what it's for, how it's built, and when you actually need one.

5 min read