emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* WISH: SQL on org-mode tables
@ 2013-08-18 14:06 Johan W. Klüwer
  2013-08-20 19:08 ` Marc Ihm
  2013-08-21  2:55 ` SAKURAI Masashi
  0 siblings, 2 replies; 5+ messages in thread
From: Johan W. Klüwer @ 2013-08-18 14:06 UTC (permalink / raw)
  To: emacs-orgmode

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

I wish it were possible to execute SQL on tables in org-mode buffers.
Filtering rows and columns, joining values across named tables, and so
forth could be done with SQL in the org-table SEND clauses.

There's a script called csvsql that allows for executing SQL on comma- or
tab-separated files from the command-line (using the H2 database engine):
https://github.com/jdurbin/durbinlib/wiki/csvsql. I'm thinking csvsql or
similar could provide the query capability, and org-mode would take care of
sending it org tables in tab separated format.

That's my wish.

Cheers

Johan

[-- Attachment #2: Type: text/html, Size: 756 bytes --]

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

* Re: WISH: SQL on org-mode tables
  2013-08-18 14:06 WISH: SQL on org-mode tables Johan W. Klüwer
@ 2013-08-20 19:08 ` Marc Ihm
  2013-08-21  0:29   ` Eric Abrahamsen
  2013-08-21  2:55 ` SAKURAI Masashi
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Ihm @ 2013-08-20 19:08 UTC (permalink / raw)
  To: "Johan W. Klüwer"; +Cc: emacs-orgmode

Yes, would like this too !
(But do not know, how to achieve this ...)

I think that simplifying the task of storing data in org-tables would allow
many interesting org-applications to be implemented more easily.

And thanks for pointing at cvsql;
will have a look.

best regards,
Marc

Am 18.08.2013 16:06, schrieb Johan W. Klüwer:
> I wish it were possible to execute SQL on tables in org-mode buffers. Filtering rows and columns, joining values across named tables, and so forth could be done with SQL in the org-table SEND clauses.
>
> There's a script called csvsql that allows for executing SQL on comma- or tab-separated files from the command-line (using the H2 database engine): https://github.com/jdurbin/durbinlib/wiki/csvsql. I'm thinking csvsql or similar could provide the query capability, and org-mode would take care of sending it org tables in tab separated format.
>
> That's my wish.
>
> Cheers
>
> Johan
>

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

* Re: WISH: SQL on org-mode tables
  2013-08-20 19:08 ` Marc Ihm
@ 2013-08-21  0:29   ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2013-08-21  0:29 UTC (permalink / raw)
  To: emacs-orgmode

Marc Ihm <marc@ihm.name> writes:

> Yes, would like this too !
> (But do not know, how to achieve this ...)
>
> I think that simplifying the task of storing data in org-tables would allow
> many interesting org-applications to be implemented more easily.
>
> And thanks for pointing at cvsql;
> will have a look.
>
> best regards,
> Marc
>
> Am 18.08.2013 16:06, schrieb Johan W. Klüwer:
>> I wish it were possible to execute SQL on tables in org-mode
>> buffers. Filtering rows and columns, joining values across named
>> tables, and so forth could be done with SQL in the org-table SEND
>> clauses.

I tend to think that the solution here involves using the right tools
for the right job. Not everything has to be in Org mode! (Though I feel
a little hypocritical claiming that.) It works so well with external
tools, why not use them?

My rule of thumb is that once a table becomes more about _data storage_
than it does about _data display_ -- ie I'm unlikely to actually examine
or export the table contents -- I try to put it in an external database,
sqlite works just fine. Between orgtable-sqlinsert to go from org table
to database, and babel to query the database, all the tools are there.
Org is just "glue", which is something it does very well.

Eric

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

* Re: WISH: SQL on org-mode tables
  2013-08-18 14:06 WISH: SQL on org-mode tables Johan W. Klüwer
  2013-08-20 19:08 ` Marc Ihm
@ 2013-08-21  2:55 ` SAKURAI Masashi
  2013-08-21  8:07   ` Johan W. Klüwer
  1 sibling, 1 reply; 5+ messages in thread
From: SAKURAI Masashi @ 2013-08-21  2:55 UTC (permalink / raw)
  To: johan.w.kluwer; +Cc: emacs-orgmode

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 1319 bytes --]

Hi,

I wrote a full DB browser in Emacs, EDBI https://github.com/kiwanami/emacs-edbi.

This program provides DB Query API (like Perl's DBI) and table layout framework.
One can query any SQL and layout the results into a rigid table format.
There is no document for API, please see the demo code.
https://github.com/kiwanami/emacs-edbi/blob/master/edbi-demo.el

I don't have a time to integrate it into org-mode,
if someone would write the code, I think I can help a little.


Regards
--
SAKURAI, Masashi (family, given)
m.sakurai@kiwanami.net


At Sun, 18 Aug 2013 16:06:43 +0200,
Johan W. Kl^[$(D+d^[(Bwer wrote:
> 
> [1  <text/plain; ISO-8859-1 (7bit)>]
> 
> [2  <text/html; ISO-8859-1 (quoted-printable)>]
> I wish it were possible to execute SQL on tables in org-mode buffers. Filtering rows and columns,
> joining values across named tables, and so forth could be done with SQL in the org-table SEND
> clauses.
> 
> There's a script called csvsql that allows for executing SQL on comma- or tab-separated files from
> the command-line (using the H2 database engine): https://github.com/jdurbin/durbinlib/wiki/csvsql.
> I'm thinking csvsql or similar could provide the query capability, and org-mode would take care of
> sending it org tables in tab separated format.
> 
> That's my wish.
> 
> Cheers
> 
> Johan
> 
> 

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

* Re: WISH: SQL on org-mode tables
  2013-08-21  2:55 ` SAKURAI Masashi
@ 2013-08-21  8:07   ` Johan W. Klüwer
  0 siblings, 0 replies; 5+ messages in thread
From: Johan W. Klüwer @ 2013-08-21  8:07 UTC (permalink / raw)
  To: SAKURAI Masashi; +Cc: emacs-orgmode

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

I started using EDBI myself just last week, it's working really well so far!

An EDBI--org combination would be amazing for database work.


2013/8/21 SAKURAI Masashi <m.sakurai@kiwanami.net>

> Hi,
>
> I wrote a full DB browser in Emacs, EDBI
> https://github.com/kiwanami/emacs-edbi.
>
> This program provides DB Query API (like Perl's DBI) and table layout
> framework.
> One can query any SQL and layout the results into a rigid table format.
> There is no document for API, please see the demo code.
> https://github.com/kiwanami/emacs-edbi/blob/master/edbi-demo.el
>
> I don't have a time to integrate it into org-mode,
> if someone would write the code, I think I can help a little.
>
>
> Regards
> --
> SAKURAI, Masashi (family, given)
> m.sakurai@kiwanami.net
>
>
> At Sun, 18 Aug 2013 16:06:43 +0200,
> Johan W. Kl�+dwer wrote:
> >
> > [1  <text/plain; ISO-8859-1 (7bit)>]
> >
> > [2  <text/html; ISO-8859-1 (quoted-printable)>]
> > I wish it were possible to execute SQL on tables in org-mode buffers.
> Filtering rows and columns,
> > joining values across named tables, and so forth could be done with SQL
> in the org-table SEND
> > clauses.
> >
> > There's a script called csvsql that allows for executing SQL on comma-
> or tab-separated files from
> > the command-line (using the H2 database engine):
> https://github.com/jdurbin/durbinlib/wiki/csvsql.
> > I'm thinking csvsql or similar could provide the query capability, and
> org-mode would take care of
> > sending it org tables in tab separated format.
> >
> > That's my wish.
> >
> > Cheers
> >
> > Johan
> >
> >
>

[-- Attachment #2: Type: text/html, Size: 2462 bytes --]

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

end of thread, other threads:[~2013-08-21  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-18 14:06 WISH: SQL on org-mode tables Johan W. Klüwer
2013-08-20 19:08 ` Marc Ihm
2013-08-21  0:29   ` Eric Abrahamsen
2013-08-21  2:55 ` SAKURAI Masashi
2013-08-21  8:07   ` Johan W. Klüwer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).