9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Getting started in Plan9 - help
@ 2002-01-21 20:39 Russ Cox
  2002-01-21 21:16 ` Matt H
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Russ Cox @ 2002-01-21 20:39 UTC (permalink / raw)
  To: 9fans

I think it might be neat to build a small number
of little programs that parse and reemit sql queries.
Thus you could use normal shell pipelines to do database
queries but since you're passing _queries_ and not _output_
through the pipes, you still reap the benefits of
query optimization.  Just like the old /acme/edit scripts.

I don't remember enough of the SQL syntax to
reparse your query into an exact shell pipeline, but
the idea is you could do something like

	sql/grep 'Car%' pages.title | sql/join section pages.idx |
	sql/p

Sql/p would behave like the acme p, actually executing
the query to produce output.

Of course, if there isn't much data, moving it into
the file system might be an even better solution.

Russ


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-21 20:39 [9fans] Getting started in Plan9 - help Russ Cox
@ 2002-01-21 21:16 ` Matt H
  2002-01-21 23:39 ` Quinn Dunkan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 18+ messages in thread
From: Matt H @ 2002-01-21 21:16 UTC (permalink / raw)
  To: 9fans

On Mon, 21 Jan 2002 15:39:45 -0500
"Russ Cox" <rsc@plan9.bell-labs.com> wrote:
> Sql/p

I've begun fiddling with something like that. I began a postgres client, I
was going to return the table as a fixed width sparse matrix in one file
with a file server and also present the same data as a directory tree.

I'm using the current website project as a way to find out the issues of
filesystem storage to make sure I'm not totally barking up the wrong tree

Can't seem to get the time to work on my actual idea.

M


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-21 20:39 [9fans] Getting started in Plan9 - help Russ Cox
  2002-01-21 21:16 ` Matt H
@ 2002-01-21 23:39 ` Quinn Dunkan
  2002-01-22 15:36 ` cej
  2002-01-22 23:02 ` [9fans] Getting started in Plan9 - help skipt
  3 siblings, 0 replies; 18+ messages in thread
From: Quinn Dunkan @ 2002-01-21 23:39 UTC (permalink / raw)
  To: 9fans


> I think it might be neat to build a small number
> of little programs that parse and reemit sql queries.
> Thus you could use normal shell pipelines to do database
> queries but since you're passing _queries_ and not _output_
> through the pipes, you still reap the benefits of
> query optimization.  Just like the old /acme/edit scripts.

It's not SQL, but:

http://www.linux.it/~carlos/nosql/


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-21 20:39 [9fans] Getting started in Plan9 - help Russ Cox
  2002-01-21 21:16 ` Matt H
  2002-01-21 23:39 ` Quinn Dunkan
@ 2002-01-22 15:36 ` cej
  2002-01-22 15:42   ` Matt H
  2002-01-22 23:02 ` [9fans] Getting started in Plan9 - help skipt
  3 siblings, 1 reply; 18+ messages in thread
From: cej @ 2002-01-22 15:36 UTC (permalink / raw)
  To: 9fans

>
> Of course, if there isn't much data, moving it into
> the file system might be an even better solution.
>
> Russ

Could anyone show me how to do such a thing? (tables + relations --> filesys)

Thanks,
--pac




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-22 15:36 ` cej
@ 2002-01-22 15:42   ` Matt H
  2002-01-22 16:42     ` [9fans] Database implementation cej
  0 siblings, 1 reply; 18+ messages in thread
From: Matt H @ 2002-01-22 15:42 UTC (permalink / raw)
  To: 9fans

On Tue, 22 Jan 2002 16:36:15 +0100
"cej@cejchan.gli.cas.cz" <cej@cejchan.gli.cas.cz> wrote:

> >
> > Of course, if there isn't much data, moving it into
> > the file system might be an even better solution.
> >
> > Russ
>
> Could anyone show me how to do such a thing? (tables + relations --> filesys)

man join
man awk
man sort
man bind
and some custom scripting is about as far as I've got

my data is such that ls /data/content/*/*.txt works for me

I'm trying to keep my data with a depth of one although I envisage being able to move to a more tree like structure to resolve inner joins and the like.

Of course, you have to consider the performance issue of losing your indexes.

Hopefully I'll be working a bit harder on it in a couple of weeks time when my current nightmare has ended !

M


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-22 16:42     ` [9fans] Database implementation cej
@ 2002-01-22 16:38       ` Boyd Roberts
  2002-01-22 17:22         ` Matt H
  2002-01-22 17:44         ` Quinn Dunkan
  0 siblings, 2 replies; 18+ messages in thread
From: Boyd Roberts @ 2002-01-22 16:38 UTC (permalink / raw)
  To: 9fans

cej@cejchan.gli.cas.cz wrote:
> I would like to know your opinion(s) about how to implement a relational
> database in Plan 9 (both client and server sides, if needed).

I think you really need to narrow the problem down.  It's like o/s
stuff; a general purpose o/s is probably not what you want if you
need 'reponse time to an event to be such and such a time'.

Sometimes a grep and an awk will do :)

A file-system + simple tools RDB would be cool (as russ pointed
out in a previous posting).


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [9fans] Database implementation
  2002-01-22 15:42   ` Matt H
@ 2002-01-22 16:42     ` cej
  2002-01-22 16:38       ` Boyd Roberts
  0 siblings, 1 reply; 18+ messages in thread
From: cej @ 2002-01-22 16:42 UTC (permalink / raw)
  To: 9fans

Hi all there,

I would like to know your opinion(s) about how to implement a relational
database in Plan 9 (both client and server sides, if needed).
Or, if anybody of you run a rel db completely under Plan 9, I'd be happy to
know.

Good night (here), or morning elsewhwere ;--)

cheers,
--pac



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-22 16:38       ` Boyd Roberts
@ 2002-01-22 17:22         ` Matt H
  2002-01-22 17:44         ` Quinn Dunkan
  1 sibling, 0 replies; 18+ messages in thread
From: Matt H @ 2002-01-22 17:22 UTC (permalink / raw)
  To: 9fans

On Tue, 22 Jan 2002 17:38:14 +0100
"Boyd Roberts" <boyd@strakt.com> wrote:

> cej@cejchan.gli.cas.cz wrote:
> > I would like to know your opinion(s) about how to implement a relational
> > database in Plan 9 (both client and server sides, if needed).

Python has an add-on called Gadfly which implements an "in memory" SQL server

There is a Python 1.5 port for plan9 somewhere

although the directory :
http://csociety-ftp.ecn.purdue.edu/pub/plan9/python

is curiously empty, but it's somewhere around

that could be a starting point if you need it *right now* !

M


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-22 16:38       ` Boyd Roberts
  2002-01-22 17:22         ` Matt H
@ 2002-01-22 17:44         ` Quinn Dunkan
  1 sibling, 0 replies; 18+ messages in thread
From: Quinn Dunkan @ 2002-01-22 17:44 UTC (permalink / raw)
  To: 9fans


> A file-system + simple tools RDB would be cool (as russ pointed
> out in a previous posting).

That's what NoSQL is.  It uses perl and sh, but there is (or was) a plan9 perl
port.  It's also mostly awk and the perl and sh bits could be rewritten
without too much work.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-21 20:39 [9fans] Getting started in Plan9 - help Russ Cox
                   ` (2 preceding siblings ...)
  2002-01-22 15:36 ` cej
@ 2002-01-22 23:02 ` skipt
  2002-01-23 10:05   ` Douglas A. Gwyn
  3 siblings, 1 reply; 18+ messages in thread
From: skipt @ 2002-01-22 23:02 UTC (permalink / raw)
  To: 9fans, 9fans

unity, a package that could be found at AT&T Toolchest long ago, kind of
did relational data management the "unix" way. My memory is not very clear
on this, but I recall it used text files, with hash index files for fast searches, and
I think it embedded the dictionary as the first (comment) line of
each file. You could use grep and awk, etc. I used it with some large data
sets, and it worked correctly and was fast. (I just checked, Lucent SSG sells it)

It is much harder to tastefully map a  table (matrix structure) to
a filesystem (a tree).

At 03:39 PM 1/21/2002 -0500, Russ Cox wrote:
>I think it might be neat to build a small number
>of little programs that parse and reemit sql queries.
>Thus you could use normal shell pipelines to do database
>queries but since you're passing _queries_ and not _output_
>through the pipes, you still reap the benefits of
>query optimization.  Just like the old /acme/edit scripts.
>
>I don't remember enough of the SQL syntax to
>reparse your query into an exact shell pipeline, but
>the idea is you could do something like
>
>	sql/grep 'Car%' pages.title | sql/join section pages.idx |
>	sql/p
>
>Sql/p would behave like the acme p, actually executing
>the query to produce output.
>
>Of course, if there isn't much data, moving it into
>the file system might be an even better solution.
>
>Russ
>
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-22 23:02 ` [9fans] Getting started in Plan9 - help skipt
@ 2002-01-23 10:05   ` Douglas A. Gwyn
  2002-01-23 22:28     ` Lyndon Nerenberg
  0 siblings, 1 reply; 18+ messages in thread
From: Douglas A. Gwyn @ 2002-01-23 10:05 UTC (permalink / raw)
  To: 9fans

skipt@real.com wrote:
> unity, ...

As I recall the source code had some problems with argument testing
(essentially, dereferencing null pointers before testing), easily
fixed once you're aware.  If you're going to pay for Unity you might
consider licensing the whole Unix System ToolChest; I think there
was a good price for this last time I checked.  There are some gems
in there, including algorithm animation and geo-mapping utilities.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Getting started in Plan9 - help
  2002-01-23 10:05   ` Douglas A. Gwyn
@ 2002-01-23 22:28     ` Lyndon Nerenberg
  0 siblings, 0 replies; 18+ messages in thread
From: Lyndon Nerenberg @ 2002-01-23 22:28 UTC (permalink / raw)
  To: 9fans

>>>>> "Douglas" == Douglas A Gwyn <DAGwyn@null.net> writes:

    Douglas> If you're going
    Douglas> to pay for Unity you might consider licensing the whole
    Douglas> Unix System ToolChest; I think there was a good price for
    Douglas> this last time I checked.  There are some gems in there,
    Douglas> including algorithm animation and geo-mapping utilities.

Pity, they seem to have dropped the System V rogue (and HDB) :-(

DWB is there, but can you license the Writers Workbench from anywhere
these days?

--lyndon


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-23  6:15 ` cej
  2002-01-23  6:33   ` skipt
@ 2002-01-23  9:40   ` William S.
  1 sibling, 0 replies; 18+ messages in thread
From: William S. @ 2002-01-23  9:40 UTC (permalink / raw)
  To: 9fans

Try the "Updates" section and scroll down to the bottom.

Bill
Amsterdam, NL

On Wed, Jan 23, 2002 at 07:15:04AM +0100, cej@cejchan.gli.cas.cz wrote:
> On Tue, Jan 22, 2002 at 06:03:33PM -0500, anothy@cosym.net wrote:
> > i'm not sure if it's suitable for your needs, but i'm quite fond of
> > pq. there's a plan 9 distribution for it (a seperate package
> > available on the download page). it is based on plain text
> [snip]
>
> PLEASE, HELP!!! Where is pq? I can't find it on the Plan9 download page.
>
> TIA,
> --pac
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-23  6:33   ` skipt
@ 2002-01-23  7:39     ` cej
  0 siblings, 0 replies; 18+ messages in thread
From: cej @ 2002-01-23  7:39 UTC (permalink / raw)
  To: 9fans

Thanks!!! I'll give it a try. Thanks are due also to others who contributed!
--pac

> Look at the bottom of the "Updates" page. Find the link to "updates" page from
> http://plan9.bell-labs.com/plan9dist
>
> At 07:15 AM 1/23/2002 +0100, cej@cejchan.gli.cas.cz wrote:
> >On Tue, Jan 22, 2002 at 06:03:33PM -0500, anothy@cosym.net wrote:
> >> i'm not sure if it's suitable for your needs, but i'm quite fond of
> >> pq. there's a plan 9 distribution for it (a seperate package
> >> available on the download page). it is based on plain text
> >[snip]
> >
> >PLEASE, HELP!!! Where is pq? I can't find it on the Plan9 download page.
> >
> >TIA,
> >--pac


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-23  6:15 ` cej
@ 2002-01-23  6:33   ` skipt
  2002-01-23  7:39     ` cej
  2002-01-23  9:40   ` William S.
  1 sibling, 1 reply; 18+ messages in thread
From: skipt @ 2002-01-23  6:33 UTC (permalink / raw)
  To: 9fans, 9fans

Look at the bottom of the "Updates" page. Find the link to "updates" page from
http://plan9.bell-labs.com/plan9dist

At 07:15 AM 1/23/2002 +0100, cej@cejchan.gli.cas.cz wrote:
>On Tue, Jan 22, 2002 at 06:03:33PM -0500, anothy@cosym.net wrote:
>> i'm not sure if it's suitable for your needs, but i'm quite fond of
>> pq. there's a plan 9 distribution for it (a seperate package
>> available on the download page). it is based on plain text
>[snip]
>
>PLEASE, HELP!!! Where is pq? I can't find it on the Plan9 download page.
>
>TIA,
>--pac



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
  2002-01-22 23:03 [9fans] Database implementation anothy
@ 2002-01-23  6:15 ` cej
  2002-01-23  6:33   ` skipt
  2002-01-23  9:40   ` William S.
  0 siblings, 2 replies; 18+ messages in thread
From: cej @ 2002-01-23  6:15 UTC (permalink / raw)
  To: 9fans

On Tue, Jan 22, 2002 at 06:03:33PM -0500, anothy@cosym.net wrote:
> i'm not sure if it's suitable for your needs, but i'm quite fond of
> pq. there's a plan 9 distribution for it (a seperate package
> available on the download page). it is based on plain text
[snip]

PLEASE, HELP!!! Where is pq? I can't find it on the Plan9 download page.

TIA,
--pac




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
@ 2002-01-23  6:10 Russ Cox
  0 siblings, 0 replies; 18+ messages in thread
From: Russ Cox @ 2002-01-23  6:10 UTC (permalink / raw)
  To: 9fans

it's on the update page between TeX and the release 2 sun sources.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] Database implementation
@ 2002-01-22 23:03 anothy
  2002-01-23  6:15 ` cej
  0 siblings, 1 reply; 18+ messages in thread
From: anothy @ 2002-01-22 23:03 UTC (permalink / raw)
  To: 9fans

i'm not sure if it's suitable for your needs, but i'm quite fond of
pq. there's a plan 9 distribution for it (a seperate package
available on the download page). it is based on plain text
files with delimiters, and can optionally work with indexes for
a substantial speed increase on very large data sets. even
without the indexes, it's reasonably snappy. the programs are
relatively small. a cousin of the version available for plan 9
runs (ran?) the corporate directories for Lucent and AT&T, and
a slightly more distant relative ran some public directory
service AT&T ran (can't remember the name). the protocol's
much simpler than SQL (for what _that's_ worth), and the
client doesn't need to know anything about the structure of
the tables or relations on the server.

a paper got written about it, but i'm not sure if it's available
to the non-Lucent world, or, if so, where.
ア



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2002-01-23 22:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-21 20:39 [9fans] Getting started in Plan9 - help Russ Cox
2002-01-21 21:16 ` Matt H
2002-01-21 23:39 ` Quinn Dunkan
2002-01-22 15:36 ` cej
2002-01-22 15:42   ` Matt H
2002-01-22 16:42     ` [9fans] Database implementation cej
2002-01-22 16:38       ` Boyd Roberts
2002-01-22 17:22         ` Matt H
2002-01-22 17:44         ` Quinn Dunkan
2002-01-22 23:02 ` [9fans] Getting started in Plan9 - help skipt
2002-01-23 10:05   ` Douglas A. Gwyn
2002-01-23 22:28     ` Lyndon Nerenberg
2002-01-22 23:03 [9fans] Database implementation anothy
2002-01-23  6:15 ` cej
2002-01-23  6:33   ` skipt
2002-01-23  7:39     ` cej
2002-01-23  9:40   ` William S.
2002-01-23  6:10 Russ Cox

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).