What Is a Database? A Plain Definition With Examples

Learn what a database is, how DBMS, tables and SQL work, the main types, and how databases differ from spreadsheets and warehouses.

What Is a Database? A Plain Definition With Examples

An online store needs to keep track of its products, its customers, its orders. When a customer makes a purchase, the store needs to instantly check stock levels, record the transaction, process the payment, and do it while other people are buying things too. These types of operations can’t be efficiently managed using individual files or a large spreadsheet. So, the store keeps its data in a database.

What is a database?

A database is an organized collection of structured information, stored electronically in a computer system. This is typically controlled by a software called database management system (DBMS). In simple terms, a database is a place where a computer keeps data in order for people and apps to find, add to, and change quickly.

A database can store almost any kind of data, such as words, numbers, images, videos, and files.

Databases are used in everyday life, even though you might not see them:

  • An online shop keeps track of its products, prices, customers and orders.
  • A travel booking system stores flights, seats and reservations.
  • A library uses a system to store books, members, and which member has which book.
  • A warehouse system keeps track of the number of items on the shelf.

Databases can do things that a pile of files can't:

  • They grow with you. The same database can store a hundred orders or many millions.
  • They help to make sure that data is correct. You can set rules, such as "no two customers can have the same customer ID", and the database will reject anything that breaks these rules.
  • They help keep data safe. You can define who has permission to view the data and who has permission to make changes.
  • They can answer questions about the data. You can ask for "all orders from last month", or "total sales by country", and get the answer back in seconds.

Database vs DBMS: what is the difference?

The data itself is the database, and the DBMS is the software to store, manage and retrieve this data.

For example, a music library (all songs) is a database, and the music player app (to play, sort and search songs) is a DBMS.

A person or an app never interacts with the stored data directly, but via a DBMS:

Database

DBMS

What it is

The stored data

The software that manages the data

Example

A shop's customer and order records

PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Microsoft Access

What you do with it

Read it, add to it, change it

Install it, run it, connect apps to it

In natural language, most people use the word database to mean either of the above things. The data, the DBMS, and any associated applications are then referred to as a database system, often referred to as just database. So if a developer says, “we use a PostgreSQL database,” they probably mean the software and the data that lives inside it.

Tables, rows, columns, keys and SQL

The majority of databases used today organize their data into tables of rows and columns. These are known as relational databases. Within relational databases, different tables are used to store different types of things, the columns in each table store attributes of these things, and rows store individual records of these things.

Here is a customers table for a small shop:

customer_id

name

123

Alice

456

Bob

789

Carol

And here is an orders table:

order_id

customer_id

product

amount

1

123

Coffee mug

12.50

2

456

Notebook

4.99

3

123

T-shirt

20.00

4

789

Backpack

45.00

To link these tables, we use two types of keys:

  • Primary key: a column that is unique for each row in the table, like an ID number. In our case, customer_id is the primary key for the customers table.
  • Foreign key: a column that references another row in a different table. In the orders table, customer_id is the foreign key, which links to the customers table and specifies which customer made the order.

By establishing this relationship, we can store Alice’s name in the customers table just once and link all her orders to that record using her ID. This is how the two tables are linked:

To get data out, you write a query in SQL (Structured Query Language). Nearly all relational databases use SQL to read, change and set up data, and 58.6% of developers in the 2025 Stack Overflow survey said they used it. This query asks for every order placed by customer 123:

SELECT
o.order_id,
c.name,
o.product,
o.amount
FROM orders AS o
INNER JOIN customers AS c ON o.customer_id = c.customer_id
WHERE c.customer_id = 123
ORDER BY o.order_id;

The database matches each order to its customer and returns only Alice's two orders:

order_id name product amount
-------- ----- ---------- ------
1 Alice Coffee mug 12.50
3 Alice T-shirt 20.00

The primary key also guards the data. If someone tries to add a second customer with ID 123, the database rejects it:

INSERT INTO customers VALUES (123, 'Dave');

sqlite3.IntegrityError: UNIQUE constraint failed: customers.customer_id

Unlike in a spreadsheet, where you can type in any ID even if it’s a duplicate, the database will flag up an error message if there’s a duplicate ID. If you’re interested in practicing SQL queries, there are several ways to learn SQL for free.

Main types of databases

Not all data can be represented well in the form of a table where all records have a similar structure. For example, contracts with various sections, sensor data that comes in millions, or people’s friendships. This kind of data can be stored in so-called NoSQL databases, which don’t store data in linked tables. These databases emerged around the early 2000s, when people started to use more than one machine to store a large database.

Here are the main types and what each one is good at:

Type

How it stores data

Good for

Examples

Relational

Tables with rows and columns, linked by keys

Orders, payments, accounts and other data with a fixed shape

PostgreSQL, MySQL, Oracle, SQL Server

Document

Each record is a document that can have its own fields

Content like articles and contracts, data whose shape changes often

MongoDB, CouchDB

Key-value

Each item is a name (the key) and its value

Very fast lookups by name

Redis, DynamoDB

Wide-column

Rows with flexible columns, spread across many servers

Very large amounts of data

Apache Cassandra, HBase

Graph

Points (nodes) joined by lines (edges)

Following relationships, such as fraud checks, social networks and recommendations

Neo4j, ArangoDB

Vector

Long lists of numbers that describe text, images or audio

AI search and machine learning

Pinecone, Milvus

To illustrate, a graph database represents data as nodes and edges. The nodes store data objects like people or bank cards, while the edges store relationships between data. Edges also have a start node, end node, and direction. This type of database can be used to run a fraud check that follows the edges from a single card to each account that it has touched.

A company might use multiple types of databases for different purposes. For example, a store might use PostgreSQL to store orders, Redis to store sessions, and MongoDB to store its product catalog. You can find out more about the different types of databases in our guide to types of databases. There is also a blog post on vector databases for AI.

Database vs spreadsheet

At first glance, a spreadsheet looks just like a database table. It has rows, columns and a header row. But, things begin to look different as the data grows and more people and applications require access to the data simultaneously.

Spreadsheets have hard size limits:

And here's how Microsoft states the limit for Excel on its official limits page:

This means that if you're a shop that logs 3,000 orders a day, you can run out of rows in your Excel sheet in around a year (1,048,576 ÷ 3,000 ≈ 350 days). If you use Google Sheets instead and have 20 columns in your order log, you're looking at a limit of 1 million rows (20,000,000 ÷ 20).

And some other notable differences:

  • Spreadsheets were first built for one user. A database, on the other hand, is built to allow multiple users and applications to read and write data at the same time.
  • A database can refuse bad data, such as a duplicate customer ID above. A spreadsheet, by default, takes any data you throw at it.
  • Your website can store an order directly into a database. With a spreadsheet, most people copy-paste data manually or through a script.
  • A database allows you to ask questions of your data through SQL queries, with data sizes that easily cross spreadsheet limits.

While spreadsheets remain a great way to store simple lists, track smaller budgets, and do some basic analysis, you can see how databases can be useful when you have data that is needed by applications, or even when there are multiple people relying on it daily.

Database vs data warehouse

A database for a shop is used throughout the day to store orders, update inventory, and fetch customer profiles. Each task will access one or a handful of rows.

"What was our revenue by country this quarter?" This query will look at millions of rows at once.

There's two types of queries: OLTP (online transaction processing) queries are the small read and write queries made by your app. OLAP (online analytical processing) queries are big, complex queries that access millions of rows. OLTP queries are handled by your database, OLAP queries are handled by your data warehouse, which is essentially a database for OLAP queries.

Database

Data warehouse

Main job

Run the app day to day

Answer questions about the business

Typical question

"Show customer 7842931's last 5 orders"

"Total revenue by country since February"

Rows per question

Tens to hundreds

Thousands to millions or more

Data it holds

Current, detailed data from one app

History from many apps and tools

Examples

PostgreSQL, MySQL

BigQuery, Snowflake, Redshift, ClickHouse

The warehouse is fast because it’s a column-oriented database. So, to answer the question about how much revenue we’ve made by country, it only reads the country, amount and date columns, as opposed to a normal database which stores the full customer row together. Here’s what the warehouse reads to answer that revenue question:

Running reports on the app’s database makes everything slower. This is because the reports are fighting with customers for the same computer. That’s why companies have both the app’s database and the warehouse. This means data must be copied from the app’s database to the warehouse. To read more about how the warehouse works, read our guide on what a data warehouse is.

Which databases do people use most?

PostgreSQL is the most popular database among developers. In the Stack Overflow survey for 2025, 55.6% of the developers responded they had used it, followed by MySQL (40.5%) and SQLite (37.5%).

As four out of the six top databases used are relational databases, it makes sense to learn about tables and SQL first. Note the 8% increase in Redis use between years.

The Stack Overflow results are very different than the DB-Engines ranking of 440 database systems by popularity (updated monthly). According to them, Oracle is the most popular database with a popularity score of 1,119.79 (October 2026), followed by MySQL, Microsoft SQL Server, and PostgreSQL. Only 10.6% of developers reported using Oracle in the Stack Overflow survey. It is important to note that the DB-Engines ranking is based on a popularity score whereas the Stack Overflow results show the percentage of developers using the database.

PostgreSQL scores well in both, and the popularity of PostgreSQL on DB-Engines has also increased by 45.56 points between October 2025 and October 2026.

Where databases came from

The history of computer databases spans over 60 years. To summarize briefly:

  1. Early 1960s: Computer databases were originally used to store data in rigid tree-like structures or networks. Some of the very first databases even stored data on magnetic tape.
  2. 1970: Edgar F. Codd, an English computer scientist, published a now-famous paper introducing the idea of storing data in tables, connected by keys.
  3. 1970s: SQL was developed by IBM with help from Oracle. This effort eventually became the official SQL standard.
  4. 1980s: Relational databases rose to be the dominant type of database.
  5. 1990s: Databases with an object-oriented paradigm came on the scene.
  6. 2000s: The rise of NoSQL databases occurred alongside the growth of the internet and distributed data.

Codd, the computer scientist, appears again in the history of databases. In 1993, he and some of his colleagues coined the term OLAP. This term is used to describe the type of big analytical questions answered by modern data warehouses.

Why companies copy many databases into one warehouse

Let’s think back to our online shop. They’ve got orders in PostgreSQL, payments in Stripe, customers in HubSpot, and ad spend in Google Ads and Meta. All of these tools answer questions about their own world. But if you want to answer questions about the connections between them, like “which ads bring the customers who spend the most?”, you’re out of luck.

The solution is to copy all the data into a single data warehouse, where an analyst can combine it with SQL. Erathos is the tool that does that copying. It connects your sources to your data warehouse with ready-to-use connectors. This is how it works:

  1. Select your sources from more than 100 connectors. These include databases like PostgreSQL, MySQL, SQL Server, and MongoDB, and tools like HubSpot, Stripe, Google Ads, and Meta.
  2. Select your destination, like BigQuery, Databricks, or Redshift.
  3. Erathos copies the data and keeps it up to date. You can see the history of each run, and get notified about them by email, Slack, or Discord.

The whole pipeline is:

When it comes to databases, the Pro plan has CDC (change data capture), which reads the database’s list of changes instead of searching large tables for changed rows. It means you get a sequence of added, updated, and deleted rows, and the app database doesn’t get slow. We wrote a list of the best CDC tools.

Felipe Corrêa, CEO of Erathos customer UoouShop, said, “We managed to integrate 6 different data sources in a single day, something that would have taken weeks without Erathos.”

Pricing is based on how many rows Erathos writes to your warehouse each month:

Plan

Starting price per month

Rows per month at that price

Data updates

Freemium

US$ 0

Up to 1 million

Daily

Movement

US$ 29

Up to 2 million

Every hour

Pro

US$ 250

Up to 5 million, includes CDC

Every 5 minutes

Our Enterprise plan covers custom volumes up to 1.5 billion rows/month. Here’s what’s available on our pricing page:

FAQ

What is a database in simple terms?

A database is a computer’s way of storing data in an organized way. This allows people and computer programs to easily search, add and edit the data. For example, a shop might store its list of customers and orders in a database.

What is the difference between a database and a DBMS?

A database is just data. A DBMS (database management system) is the software that allows you to store, read and edit that data. PostgreSQL, MySQL and Oracle Database are examples of DBMSs. In everyday conversation, people often use the word “database” to mean both of these things.

Is Excel a database?

No, Excel is a spreadsheet. It does store data in rows and columns, but it has some limitations:

  • Each sheet can only have 1,048,576 rows of data.
  • It doesn’t prevent duplicate IDs unless you add checks.
  • It was originally designed for single users.

Excel is more suited to storing smaller lists of data and for running quick analysis on that data.

Is SQL a database?

No, SQL is a language used to interact with data in a relational database. PostgreSQL, MySQL and SQL Server are some databases that speak SQL.

What is the difference between SQL and NoSQL databases?

SQL databases, also known as relational databases, store data in tables of predefined columns and relationships are defined by keys. NoSQL databases store data in other formats, such as documents, key-value pairs or graphs, and are easier to scale across multiple servers. SQL databases are more suited for things like orders and payments, whereas NoSQL is better for data whose shape changes often or that needs to be accessed quickly.

What is the most popular database?

PostgreSQL is the most commonly used database with 55.6% of developers saying they use it in the 2025 Stack Overflow survey. Oracle is the most popular database according to DB-Engines, with a score of 1,119.79 in October 2026.

Who invented the relational database?

Edgar F. Codd, an English computer scientist, published his paper on the relational database model in 1970, and IBM went on to develop SQL in the 1970s.

Do I need a data warehouse if I already have a database?

If you have a lot of historical data to report on, or if you want to report on multiple tools, then you need a data warehouse. If you use your app’s database for big reports, then it can slow down your app. If you use your app’s database, then it only has data about your app. A warehouse is built for big questions, and it holds copies of everything, so you can do reports across multiple tools.

Try Erathos free for 14 days. Erathos will give you the Pro plan for 14 days, including CDC and all the connectors. After 14 days your account will be on the free plan, unless you choose a paid plan. There’s no credit card required.