Beginner Follow-Up Questions: What Exactly Is a Database?

You have heard that a database "stores data". That answer raises more questions than it settles. Here are the follow-up questions new learners ask us most, answered in plain words with no assumed knowledge.

The basics, one layer down

Is a spreadsheet a database?

Not quite, although they look alike. A spreadsheet is a grid that a person edits by hand. A database is built to be used by programs. It checks the rules you give it (for example "every order must have a customer"), lets many programs read and write at the same time without trampling each other, and can answer questions about millions of rows quickly. A spreadsheet is a great place to sketch your data. A database is where an app keeps it.

Why not just save data in a text file?

You can, and tiny scripts often do. Problems appear as soon as two people or two programs write at once, or the file gets big. You would have to invent your own way to find one record quickly, to avoid half-written changes after a crash, and to stop bad data getting in. A database already solves those problems, so you do not have to.

What is a DBMS?

DBMS stands for database management system: the software that manages the data. PostgreSQL, MySQL, SQLite and SQL Server are all DBMSs. People often say "database" when they mean the software, the data, or both. In everyday talk that is fine.

How apps use databases

Why does the database run as a separate server?

Most databases (PostgreSQL, MySQL, SQL Server) run as a server program. Your app connects to it over a network, even if both are on the same laptop. That way many copies of your app, plus admin tools, can share one set of data. SQLite is the friendly exception: it is a library inside your program that reads and writes a single file, which makes it ideal for learning.

What language do I use to talk to it?

For relational databases, SQL (Structured Query Language). A first example:

SELECT name, email FROM students WHERE year = 2;

This asks for the name and email of every student in year two. You describe *what* you want; the database works out *how* to find it.

Do I need to learn SQL if I use an ORM?

An ORM (object-relational mapper) lets you write code like Student.objects.filter(year=2) instead of SQL. It is useful, but it writes SQL for you behind the scenes. Knowing a little SQL helps you understand what it is doing and fix things when they go wrong.

Common worries

Can I break a database while learning?

You can delete data you meant to keep, so practise on a test database, never on real customer data. SQLite is perfect for this: if you make a mess, delete the file and start again.

How big does data need to be before I need a database?

Size is not the main reason. Even a small app benefits from rules, safe concurrent access and easy questions. If your program saves anything that matters, a database is worth it.

Where do I go next?

Try our six-part beginner course on what a database is, then practise with tables, rows and columns.

A free learning page for beginners. Practise on a test database, never on real customer data, and check the official documentation for your database version.