ENES

Database

An organized store of data that programs can search and update safely.

A database cylinder holding a table of rows and columns, queried by a web app and a mobile app

A database is a program whose whole job is to store data and answer questions about it quickly and safely: every user of an app, every order, every message. Unlike a spreadsheet, it is built to be used by many programs at once, to hold millions of rows, and to never lose or half-save a change, even if the power goes out in the middle of a write.

The most common kind is relational: data lives in tables with rows and columns (a customers table, an orders table), tables point to each other by ids, and you ask questions in SQL. PostgreSQL, MySQL and SQLite are relational and open source; Amazon RDS runs them for you in the cloud. NoSQL databases drop the strict tables for flexible documents (MongoDB), key-value pairs (Redis, Amazon DynamoDB) or graphs, trading some guarantees for speed or scale.

Almost every app you use is a thin layer over a database. Open Instagram and a query fetches your feed; pay someone and a transaction moves money between two accounts as a single all-or-nothing step. Backups, indexes (so a row can be found without scanning the whole table) and permissions are the daily work of keeping one healthy.

Keep in mind

Go deeper

Related terms

More in Software