#PostgreSQL

27 posts

PostgreSQL Basics #2 Data Types and Table Design: What to Store Things As
5 min read

PostgreSQL Basics #2 Data Types and Table Design: What to Store Things As

Half of PostgreSQL design is choosing data types. Why text alone is enough for strings, why numeric is mandatory for money, timestamptz as the standard for points in time and the timestamp trap, primary key strategy (bigint IDENTITY vs UUID, and uuidv7), enforcing data integrity at the database layer with NOT NULL, CHECK, and foreign keys, and where enums and arrays belong.

PostgreSQL Basics #1 What PostgreSQL Is: Why It Became the Default, Installation and First psql Session
4 min read

PostgreSQL Basics #1 What PostgreSQL Is: Why It Became the Default, Installation and First psql Session

Starting from why PostgreSQL became the default database for new projects: standards compliance, a rich set of data types, the extension ecosystem (pgvector, PostGIS), and a permissive license. Then the fastest local setup with Docker, connecting with psql and the essential meta-commands (\l, \dt, \d), a first cycle of creating a table, inserting, and querying, and a map of the whole course.

Docker in Practice #2: Django + PostgreSQL compose — Two Containers as One
9 min read

Docker in Practice #2: Django + PostgreSQL compose — Two Containers as One

Bundling a Django app and PostgreSQL into one docker compose file. Migration entrypoint, depends_on relying on healthcheck, data volumes, .env separation, and collectstatic — a production-shaped compose setup.