I wrote the book on developer marketing. Literally. Picks and Shovels hit #1 on Amazon.

Get your copy
Engineering and DevOps

Database

DAY-tuh-bayss

A structured system for storing, organizing, and retrieving data.

A database is a system for storing and retrieving data. It is the memory of the application. User profiles, orders, messages, settings, and every other piece of persistent data lives in a database.

Relational databases (PostgreSQL, MySQL) store data in tables with rows and columns, connected by relationships. They enforce structure and consistency through a defined schema. NoSQL databases (MongoDB, DynamoDB) store data in flexible documents, key-value pairs, or graphs. They trade structure for flexibility and scale.

The database choice is one of the most consequential architectural decisions. It affects performance, scalability, consistency, and the types of queries you can run efficiently. Changing databases mid-project is expensive and risky. Choose carefully upfront.

Examples

A startup chooses PostgreSQL.

PostgreSQL handles relational data (users, orders, products), supports JSON columns for flexible data, scales to millions of rows, and has a massive ecosystem of tools and extensions. The startup's needs are fully covered for years. It is the default choice for most applications.

A database query becomes a performance bottleneck.

A query that joins three tables takes 3 seconds with 10 million rows. The team adds a composite index on the join columns. The same query returns in 15 milliseconds. Proper indexing is the single biggest database performance optimization.

A company uses multiple databases.

The application uses PostgreSQL for transactional data (orders, users), Redis for caching and session storage, and Elasticsearch for full-text search. Each database is optimized for its workload. The backend services route queries to the appropriate database.

In practice

Read more on the blog

Frequently asked questions

Should I use SQL or NoSQL?

Default to SQL (PostgreSQL). It handles most workloads well, enforces data consistency, supports complex queries, and has decades of tooling. Use NoSQL when you have specific requirements SQL cannot meet: massive write throughput (DynamoDB), flexible schemas (MongoDB), or graph relationships (Neo4j).

What is the difference between a database and a data warehouse?

A database serves the application in real-time: fast reads and writes for individual records. A data warehouse stores historical data for analysis: complex queries across millions of records for reporting and business intelligence. Different tools for different jobs.

Related terms

Picks and Shovels: Marketing to Developers During the AI Gold Rush

Want the complete playbook?

Picks and Shovels is the definitive guide to developer marketing. Amazon #1 bestseller with practical strategies from 30 years of marketing to developers.