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.

26 Upvotes

73 comments sorted by

View all comments

Show parent comment

1

u/Proper_Meaning7756 Jul 01 '26

Yeah, I think I'm getting it. The file format for storage is just one part of what makes something a database. I wish I could've found that info sooner.

2

u/LaughingIshikawa Jul 01 '26

The file format for storage is just one part of what makes something a database

Oh, I mean... Not really? 😅

I think strictly speaking you could make something that meets all the specifications of what "technically" makes something a database, using virtually any file format. You just tend not to, because once you're putting in the work to make it a database, one of your goals is probably to be able to read and write to it as fast as possible / practical. (Which most file formats aren't going to be optimized for.)

1

u/Proper_Meaning7756 Jul 01 '26

That was 9 hours ago and in the meantime, I looked at how postgres and mongo were implemented. And yeah, you're right. Thinking about them as files or data structures isn't that helpful by itself.