News for hackers. Stuff that matters.
Re:Why I love databases by duaneb on Sunday November 09, 2014 @07:12PM (#8581386)
The file system is just a shitty db. Why does it matter whether it writes to a file system or to sqlite3?
Re:Why I love databases by sklogic on Sunday November 09, 2014 @08:04PM (#8581520)
Because all you need most of the time is a flat stream of characters. You don't need any of the DB crap, no random access, no indexes, no structure.
Re:Why I love databases by superuser2 on Sunday November 09, 2014 @08:52PM (#8581672)
It depends on the problem domain you are working in. I can't think of an application I've done where this wouldn't have required complex serialization and parsing. Those tools are already built for me in the form of ORMs and RDMSes. Why should I write my own?
Re:Why I love databases by sklogic on Monday November 10, 2014 @03:54AM (#8582584)
> It depends on the problem domain you are working in.

Unix is a pretty general purpose thing. And yet, you won't find anything in it that needs a database, nothing at all among hundreds of applications, including some fairly complex ones, like CAD/CAE tools, IDEs, compilers, etc.

> I can't think of an application I've done where this wouldn't have required complex serialization and parsing.

Are you doing CRUD mostly?

> Those tools are already built for me in the form of ORMs and RDMSes. Why should I write my own?

Parsing?!? In ORMs and DBMSes?!? C'mon, try to parse me some C++ with your Oracle.

Re:Why I love databases by duaneb on Monday November 10, 2014 @04:57PM (#8586794)
> Unix is a pretty general purpose thing.

Yea, until you want to query a normalized data set. Then unix is pretty miserable, because text is very ill-suited for indices and rapid and/or random access.

Re:Why I love databases by sklogic on Monday November 10, 2014 @05:37PM (#8587063)
Turns out, you need to do such things pretty rarely. Not "most of the time", as RDMBS proponents claim.
Re:Why I love databases by superuser2 on Monday November 10, 2014 @09:44PM (#8587997)
>Parsing?!? In ORMs and DBMSes?!?

What exactly do you think a database does? Provides a way to durably store tabular data on disk and read it back. Without a database, I have to make that myself by writing serialization routines to put my data structures on disk and parsing routines to go from "stream of characters" to my data structures.

DMBS places some limits on your data structures but does all that for you.

Re:Why I love databases by sklogic on Tuesday November 11, 2014 @04:24AM (#8589027)
If serialisation is hard for you, then you probably doing something badly wrong. In the tools I'm using it's done by a single line of code. And since most of the time data structures are trees or graphs, being sledgehammered into a tabular structure is not pleasant at all.
Re:Why I love databases by SamReidHughes on Monday November 10, 2014 @12:24PM (#8584828)
> Parsing?!? In ORMs and DBMSes?!?

Yes. Stuff stored in files has to be parsed when you read it out of files.

Re:Why I love databases by sklogic on Monday November 10, 2014 @12:38PM (#8584932)
And how exactly RDBMS crap could help with parsing? Mind parsing a C++ source file with your RDBMS?
Re:Why I love databases by SamReidHughes on Monday November 10, 2014 @12:41PM (#8584952)
The grandparent was talking about the serialization and parsing of the data that you'd be storing in flat files, not parsing of C++ files. Work that you avoid by using a DBMS.
Re:Why I love databases by sklogic on Monday November 10, 2014 @12:47PM (#8584989)
Parsing text files is not a problem at all. Never been a problem. And there are far too many benefits of having flat text streams vs. some inaccessible stupid binary ad hoc formats hidden inside some enterprisey RDBMS guts.
Re:Why I love databases by eropple on Sunday November 09, 2014 @08:53PM (#8581674)
Maybe you can replace a document database with the file system (though reinventing indexes for reasonable performance--which in so many use cases becomes remarkably important past a few hundreds of thousands of records--will be fun for you), but modeling relational concepts on the file system is both hard and time-consuming. And I'm comfortable saying that most nontrivial business applications are fundamentally relational.
Re:Why I love databases by sklogic on Monday November 10, 2014 @03:57AM (#8582591)
> And I'm comfortable saying that most nontrivial business applications are fundamentally relational.

Now try to assess, how many applications are supposed to be "nontrivial business applications". It's quite a niche thing, and that's where all this DBMS stuff belongs to. Please do not impose this crap on the rest of the world, we don't need your CRUD.

Re:Why I love databases by eropple on Monday November 10, 2014 @01:55PM (#8585460)
Why are you so randomly hostile about this? Your tone and attitude are super shitty throughout this thread. Chill.

As for CRUD--I'm a platform and devops engineer. I'm not a web developer (except incidentally). But I do often write relational things--like, say, "I have this node, running this application, using this artifact from that data store"--that are best modeled by a relational data store. They're otherwise trivial applications, but reinventing the relational data store would take orders of magnitude longer than writing the application against SQLite or Postgres. How do you propose to model relations across the file system in a way that doesn't make it the tail wagging the dog?

While I'm thinking about it, I'm pretty comfortable going further than "nontrivial business applications" to "a majority of networked applications". The world is relational. Modeling it relationally makes a lot of sense for a lot of use cases.

Re:Why I love databases by sklogic on Monday November 10, 2014 @02:30PM (#8585662)
No, it's RDBMS proponents who are hostile. Their attitude is "you will be assimilated, resistance is futile, we already won, so shut up and obey". This cannot and will not be tolerated.

I was pressured many times into giving up doing things the right way and adopting RDBMSes, and that was not pleasant at all. In some cases someone else who picked up that projects tried to move to RDBMSes (from hierarchical or document-oriented storages used before) and failed miserably.

So, again, I never came across anything that would need a relational storage. Not even when I was doing heavily distributed HPC (which is as "networked" as it gets). Yes, of course I did a lot of things that are relational naturally - but all of them were in Datalog, with no storage required.

Btw., wtf is "devops"? I've heard this a number of times recently, but nobody could explain the meaning.

Re:Why I love databases by eropple on Monday November 10, 2014 @03:33PM (#8586163)
Your anecdotes are interesting, but they don't present anything substantiative with regards to this discussion that merits this spittle-flecking you're trotting out here. Nobody's telling you to not do as you feel is right, at least not around here--what you describe isn't happening in this thread. You're being strangely aggressive and hostile just at the idea of using a relational data store to store relational data and I have no idea why.

As far as devops go, the lack of a solid term is why I use the term "platform engineering" for what I do. I build things to make other developers more productive and systems more responsive and scalable.

Re:Why I love databases by sklogic on Monday November 10, 2014 @05:35PM (#8587046)
Wait a minute. Cult of Codd is proclaiming that everything is relational and everyone should always use RDMBS, and if they don't, they're doing it wrong and wasting their time. OP went even further with claims that RDBMSes cover pretty much everything in the CS. If it's not an aggressive cult, I don't know what else could be more aggressive.

I'm ok with using RDBMS for storing relational data, everything has its niche and every tool could be used efficiently when needed. What I'm not ok with is when cultists try to force everyone else to use their precious hammer everywhere, for every little nail. I'm not ok when I'm told that if I did not use RDBMSes I did not do any large scale data analysis.