The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Grant Taylor via TUHS <tuhs@minnie.tuhs.org>
To: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] cut, paste, join, etc.
Date: Tue, 16 Feb 2021 21:08:15 -0700	[thread overview]
Message-ID: <e11f295f-a4db-ae4f-0da6-85b6d52be7ad@spamtrap.tnetconsulting.net> (raw)
In-Reply-To: <55d60220-c22d-c99f-f40c-68a741183213@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

On 2/16/21 7:26 PM, Will Senn wrote:
> Oops. That's right, no username & password, but you still need to bring 
> it up and interact with it... accept, as you say, you can enter your sql 
> as an argument to the executable. OK, I suppose ... grump, grump...

;-)

Take a moment and grump.  I know that I've made similar mistakes from 
unknown options.

> Not quite what I was thinking, but I'd be hard pressed to argue the 
> difference between creating a handful of files in the filesystem 
> (vs tables in sqlite) and then using some unix filter utilities to 
> access and combine the file relations (vs passing sql to sqlite)

I don't know where the line is to transition from stock text files and 
an actual DB.  I naively suspect that by the time you need an index, you 
should have transitioned to a DB.

> other than, it'd be fun if there were select, col, row (grep?), join 
> (inner, outer, natural), utils that worked with text without the need 
> to worry about the finickiness of the database

I'm confident that it's quite possible to do similar types of, if not 
actually the same, operation with traditional Unix utilities vs SQL, at 
least for relatively simple queries.

The last time I looked, join didn't want to work on more than two inputs 
at one time.  So you're left with something like two different joins, 
one of which working on the output from the other one.

I suspect that one of the differences is where the data lives.  If it's 
STDIO, then traditional Unix utilities are king.  If it's something 
application specific and only accessed by said application, then a DB is 
probably a better bet.

Then there's the fact that some consider file systems to be a big DB 
that is mounted.  }:-)

> (don't stone me as a database unbeliever, I've used plenty in my day).

Use of something does not implicitly make you a supporter of or advocate 
for something.  ;-)

I like SQLite and Berkeley DB in that they don't require a full RDBMS 
running.  Instead, an application can load what it needs and access the 
DB itself.

I don't remember how many files SQLite uses to store a DB.  A single (or 
few) file(s) make it relatively easy to exchange DBs with people.  E.g. 
someone can populate the DB and then send copies of it to coworkers for 
their distributed use.  Something that's harder to do with a typical RDBMS.



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

  reply	other threads:[~2021-02-17  4:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  1:08 M Douglas McIlroy
2021-02-17  1:16 ` Will Senn
2021-02-17  1:43   ` Grant Taylor via TUHS
2021-02-17  2:26     ` Will Senn
2021-02-17  4:08       ` Grant Taylor via TUHS [this message]
2021-02-17 10:14         ` John Gilmore
2021-02-17 14:52           ` Andrew Hume
2021-02-17 23:58           ` Dan Cross
2021-02-17 20:49         ` Dave Horsfall
2021-02-22  5:57       ` Tomasz Rola
2021-02-17  3:29   ` John Cowan
  -- strict thread matches above, loose matches on Subject: below --
2021-02-18 20:20 Brian Walden
2021-02-18 20:41 ` Anthony Martin
2021-02-16 20:33 Will Senn
2021-02-16 21:02 ` Dave Horsfall
2021-02-16 21:15   ` Will Senn
2021-02-16 21:26     ` Dave Horsfall
2021-02-16 21:06 ` Dennis Boone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e11f295f-a4db-ae4f-0da6-85b6d52be7ad@spamtrap.tnetconsulting.net \
    --to=tuhs@minnie.tuhs.org \
    --cc=gtaylor@tnetconsulting.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).