Database
In one line
A database is an organized collection of data stored so it can be accessed, managed, and updated efficiently.
In simple words
A database is a structured place to store data so that programs can read and write it quickly, safely, and reliably. Unlike a plain text file or a spreadsheet, a database is built to handle many users at once, enforce rules about what data is allowed, and recover from crashes.
Almost every real application uses a database — a blog stores posts and comments, an online shop stores products and orders, a chat app stores messages. The database is the persistent memory of the application.
There are many kinds of databases. Relational (SQL) databases store data in tables; NoSQL databases store documents, key-value pairs, or graphs. The right choice depends on your data shape and query patterns.
Example
-- A simple table inside a database
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE
);This SQL creates a users table inside a relational database — the table is the structure, the database holds it.
Related terms
Related Resources
Related Lessons
- Database Overview
Start learning what databases are and why apps need them.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.