by crazygringo · 5y ago · 0 comments
Honestly I'd love to see SQL (or something like it) become a first-class citizen in operating systems generally -- as a standard way for manipulating files, logs, preference files, etc.
To be clear: not turning things into databases (keep logs as logs), but make everything interpretable to SQL.
It's bizarre to me that in just a few lines I can achieve magic with a database... but I can't trivially do the same magic with my filesystem.
Just like a shell is an integral part of an OS... shouldn't a query language be too? I'd love it if, out-of-the-box, Linux distributions came with a standardized SQL+JSON-over-the-filesystem approach that functioned as a small-scale working database for any tool that wanted to use it as such.
But for me the idea of writing (CREATE, UPDATE, DELETE) would be an integral part of it as well -- whether inserting a property into a JSON file, adding a cronjob as column parameters rather than a text line, or creating files.
Red hatters maintained it (hung out in irc) until cloud container workflows surpassed in-place system administration. It pairs nicely with puppet, and can be used manually.
https://docs.microsoft.com/en-us/windows/win32/wmisdk/queryi...
Something that at least gets halfway is 'Everything' since it indexes files extremely quickly, sorts on multiple attributes extremely quickly, and allows regular expressions. It would be better if these things were built into the OS so that tools could be built on top of them.
Having some cli tools that focussed on this would be relatively easy to implement, and you could even create a special GUI based tool.
What do you have in mind when it comes to it being a “first class citizen” of the OS?
c : a + b
select col from my_table where other_col > c
So no more faffing around with manually building queries, and queries are ran by the same process that has access to all your variables.