r/AskProgramming • • Jul 01 '26

Databases What actually is a database?

I was looking at the definitions online and a database is always used interchangeably with DBMS and the ELI5 answers I've seen describe databases as a means of organising data in structured ways to make reading and writing data easy, safe and fast.

The extension of this logic to me is, shouldn't csv files count as databases too if you had a way to retrieve, modify and store data with the general ACID principles and whatnot? Googling that tells me that CSV files don't count because they only store raw data.

So then, are databases defined by the mechanism which data is handled? Doesn't that make any file a database as long as its implemented properly?

Edit:

Just wanted to add:

  • I'm using sqlite3 from python for my project. I come from an embedded systems background so I had to know the specifics of what I was working with.
  • The responses here seem a little mixed with some people agreeing that csv files with the proper wrappers would make a (terrible) database.
  • I think I get it now. The storage format is just a part of what makes a database and is not the database itself.

Edit 2:
u/StevenJOwens

u/esaule

u/LaughingIshikawa

u/rolfn

TLDR: These guys and some others answers honestly sum up a lot of the questions I had and a bit more I didn't know to ask. Thanks guys.

22 Upvotes

73 comments sorted by

View all comments

38

u/rolfn Jul 01 '26

There are several complementing concepts here:
- csv is a storage format used on disk
- acid is a set of guarantees given by a system to the users of that system
- sql is a programming language

Very often a database means RDBMS (relational database management system), which usually is sql and acid, but it doesn’t need to be.

When talking about a database system, we usually only care about the capabilities of that system, which may include some or all of acid, and may include sql. We usually don’t care about the on disk storage format.

A database (without the «system») usually only means «storage of data». Your hand-written notebook can be regarded as a database of your recorded memory.

So csv is a storage format, it can be regarded as a database, but it is not a database system without some software on top providing atleast some sort of query capabilities.

4

u/leogodin217 Jul 01 '26

Bam! Concise. Accurate. OP read this.

2

u/WHAT_THY_FORK Jul 02 '26

Also, what makes SQLite a database system is that despite there being no server process (by design), the “system” is the library that you import in your codebase to run transactions against the .sqlite file.

1

u/ReasonableLoss6814 Jul 02 '26

Actually ... if you read our paper: https://arxiv.org/abs/2605.09114 -- you'll see that a csv file is actually a consistency model with certain guarantees ;)

1

u/Proper_Meaning7756 Jul 05 '26 edited Jul 05 '26

I just came across this and realised I didn't understand a word. What background do you need to be able to read the paper? I only have a very basic engineering mathematics knowledge, so calculus, linear algebra, probability, statistics, complex numbers and a little bit of signals.

Edit:
Wanted to add context. I was working on developing a toy language as part of my training and this paper feels like I should be able to follow because I spotted a few familiar words.

-1

u/hibikir_40k Jul 02 '26

Too narrow: DynamoDB is definitely a database. ACID? Nope. SQL? Nope. But you can access data by primary key, across the world, and you have some eventual consistency, but it will bite you if you assume you have, say, Postgres' guarantees.

3

u/rolfn Jul 02 '26

I’m not sure what you mean by «too narrow». Where do you think we disagree?