PostgreSQL is an open-source relational (SQL) database maintained by the PostgreSQL Global Development Group, a worldwide volunteer community with no single corporate owner. It's the most-used database in the world today, reported in roughly 55.6% of developer surveys. Developers reach for it because it pairs strict SQL-standards compliance with advanced features โ JSON/JSONB columns, full-text search, custom types, and window functions โ making it the modern default choice for new backend projects.
PostgreSQL lets you mix strict relational columns with a flexible JSONB column in the same table, then query inside that JSON with native operators.
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
customer TEXT NOT NULL,
total NUMERIC(10,2) NOT NULL,
metadata JSONB
);
INSERT INTO orders (customer, total, metadata)
VALUES ('Ava Chen', 89.99, '{"coupon": "SUMMER10", "gift_wrap": true}');
-- query inside the JSONB column directly
SELECT customer, total
FROM orders
WHERE metadata ->> 'coupon' = 'SUMMER10'
ORDER BY total DESC;
Install the server locally, or spin one up instantly with Docker, then connect with the psql client.
# Docker: run a local Postgres instance
docker run --name pg -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:16
# connect with the psql CLI
psql -h localhost -U postgres -d postgres