Re:Do you even need a database?
by trgn on Wednesday April 15, 2026 @01:44PM
(#47782576)
im sure, but honestly, i would love to have a db engine that just writes/reads csv or json. does it exist?
[ Parent
| on HN ]
Re:Do you even need a database?
by banana_giraffe on Wednesday April 15, 2026 @01:51PM
(#47782667)
DuckDB can do exactly this, once you get the API working in your system, it becomes something simple like
SELECT \* from read_csv('example.csv');
Writing generally involves reading to an in-memory database, making whatever changes you want, then something like COPY new_table TO 'example.csv' (HEADER true, DELIMITER ',');
Re:Do you even need a database?
by herpdyderp on Wednesday April 15, 2026 @01:47PM
(#47782620)
I wrote a CSV DB engine once! I can't remember why. For fun?
Microsoft actually provide an ODBC CSV data source out of the box.
SQLite can do it
it's storage file is a csv? or do you mean import/export to csv?
You can import csv files into in memory tables and query them or you can use the csv extensions
$ sqlite3 :memory:
.import myfile.csv mytable
SELECT * FROM mytable;
$ sqlite3 :memory:
SELECT *
FROM csv_read('myfile.csv');
Re:Do you even need a database?
by hunterpayne on Wednesday April 15, 2026 @08:01PM
(#47786980)
Postgres can do that as well.