Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Surely the successor should be SQLite. Tabular data like CSV, easy to view on different mediums, free and open source, single file databases. It has to be this, right?


Replacing an almost trivial open format with one that requires a specific 85 kLOC codebase to access does not seem like an improvement.

SQLite is wonderful, but it's definitely not a replacement for CSV


> Replacing an almost trivial open format

The main feature of CSV is that it's aways broken, not that it's almost trivial.

> with one that requires a specific 85 kLOC codebase to access

sqlite is available essentially everywhere. Every browser uses sqlite extensively internally, so do tons of other software on your standard desktop machine (to say nothing of mobile OS where it's ubiquitous). Using sqlite is not any sort of constraint.

> SQLite is wonderful, but it's definitely not a replacement for CSV

Only in the sense that it's nowhere near as bad and annoying as CSV.


yeah, why not replace a dense human readable easily generated format with a third party format that requires installation of compiled binaries and an over the wire protocol


An SQLite dump is human readable and the data in the dump actually is in a CSV format, just surrounded with information on types and relationships. Here's the first few lines for example of a dump of an SQLite DB that I have of some temperature sensor data:

  PRAGMA foreign_keys=OFF;
  BEGIN TRANSACTION;
  CREATE TABLE temperature
  (
    ts integer,
    Tc real,
    Tf real,
    src_id integer
  );
  INSERT INTO temperature VALUES(1615165342,5.5999999999999996447,42.099999999999999644,1);
  INSERT INTO temperature VALUES(1615165350,0.6,32.999999999999998223,3);
  INSERT INTO temperature VALUES(1615165404,5.5,41.899999999999995026,1);
  INSERT INTO temperature VALUES(1615165410,-17.199999999999999289,1.0,2);
  INSERT INTO temperature VALUES(1615165435,5.5,41.899999999999995026,1);
SQLite dumps would actually be a pretty good data exchange format. As mentioned there is a CSV inside there. It's not hard to extract that if you need an unadorned CSV--some grep and sed, or grep and cut, or a few lines of scripting.

Or if you have SQLite installed, it is an easy to have SQLite itself read the dump and export it in CSV, letting it deal with things like quoting that can be a pain with grep and sed/cut. This way also makes it easy to rearrange or omit columns and to do some filtering so that data you don't care about doesn't get into the CSV.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: