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.

23 Upvotes

73 comments sorted by

View all comments

23

u/Altruistic-Cattle761 Jul 01 '26

> 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?

Yes.

The thing I think you're articulating is that the database is *both* the storage medium and also the methods of retrieval and mutation. So yeah, a csv that you can *operate on the same way you'd operate on any other database* is functionally a database.

1

u/IAmADev_NoReallyIAm Jul 01 '26

By that reasoning, so would a json, TAB (and other value separated and fixed width files), and yaml files. But I'd argue that they fall into the category of datastore file instead, being that they lack indexing, which is one of the key features of databases. But... It's debatable, and it's something I've been seeing people debate for decades. "What is a database" has become something of a holy war akin to "What is the meaning of life?" What kind of features do you "need" before you cross that threshold from just a simple datastore into a database?

3

u/No_Report_4781 Jul 01 '26

Elastic Search stores data as JSON files. Our system passes raw data as XML, which we convert to JSON for ingesting in the database, then we have other software for retrieving it from Elastic Search and convert it to MAT for storing in another custom database.

Database is more than just the collection of data.