Hacker News new | ask | show | jobs
by xwowsersx 1284 days ago
I mean point well taken, but, as they acknowledged in the post themselves, CSV isn't suitable when you have a nested structure. And you almost always have/need a nested structure, no?
2 comments

Relational databases have worked fine for decades without nested structures. The simple trick is to take the nested structure out of the entity and into its own table.
Unless I misunderstood something, I'm not sure I understand the relevance here. I assumed we were talking about sending data to clients. In such cases, you do not send database tables. Instead, you send rich, fully hydrated objects which are the result of joining those tables. The serialized representation can be backed by the relational model, but at some point you have to put those together to send something useful to the client. My only point is that CSV is unsuitable for this task in many/most cases.
That may be simple trick for the db, but not when your paradigm involves importing files - imaging telling that to users, instead of giving json, please give 75 csv files.
This scenario might be more common than you think -- spreadsheets still reign supreme, and often 75 csv files is how the users have the data to begin with.

(Incidentally, my day job is building a spreadsheet importer.)

Did they? And all the databases I use regularly support nested structures, they are extremely expressive.
CSV isn't suitable when you have a nested structure.

As the post acknowledges right about where you stopped skimming.

And you almost always have/need a nested structure, no?

No.

> as they acknowledged in the post themselves

As I noted in my own comment. Ironic to accuse me of skimming the original post when you couldn't even read my two sentences.

My very bad - please have my sincerest apology.
Apology accepted, no worries